| Obfuscation fails - JAR contains Manifest only [message #536176]
||Thu, 27 May 2010 10:26
Registered: May 2010
I'm using Eclipse 3.5.1 and Java Mobile Tools 1.1.0. Furthermore I use the bouncycastle lightweight API v 1.45. I have created a simple Hello World midlet. I can deploy this fine as a regular package. A correspending jad as well jar file is created and it contains all my classes.
When importing some libs from bouncycastle, this will not be included though. When running the midlet in the emulator, it will fail, since it cannot find the bouncy castle class files.
Nevertheless, since I want to use the bouncy castle API, I need to create obfuscated packages. When doing this, the process succeeds, but the created JAR is completely empty. It will only contain the Manifest. When running this in the emulator I get a classdefnotfound error, since the JAR does not contain any class files.
So, when I create a regular package: the jar contains my classes but not the required bc classes. (I know this would not work since I need to use obfuscation when working with bouncy castle, however, the classes are not even included...)
When creating an obfuscated package, the created JAR will contain the manifest only, not even my classes, although I have adapted the "keep" expressions of proguard accordingly. I have tried this with proguard-4.4 and proguard-4.5 beta.
When creating the packages I get lots of this messages in the error log:
"Error: Unknown option '/tmp/_mtj.tmpsam/cldc_classes_zip_7504998854349934605.tmp' in argument number 1"
Could this be related to why the class files are not included in the library? The cldc_classes.zip of bouncy castle is added to the build path, as well as exported. I get the a warning about "duplicate class definitions", but this is normal since BC overwrites some classes from java.io etc., right?
Maybe anybody has a clue and can give me a hint
Powered by FUDForum
. Page generated in 0.01859 seconds