Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » DSDP - Mobile Tools for Java (MTJ) » Obfuscation fails - JAR contains Manifest only(Deploying regular packages works, obfuscated packages do not contain classes)
icon5.gif  Obfuscation fails - JAR contains Manifest only [message #536176] Thu, 27 May 2010 10:26 Go to next message
Johannes  is currently offline Johannes Friend
Messages: 2
Registered: May 2010
Junior Member

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 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 etc., right?

Maybe anybody has a clue and can give me a hint Smile

Re: Obfuscation fails - JAR contains Manifest only [message #839780 is a reply to message #536176] Mon, 09 April 2012 07:20 Go to previous message
Quang Dao Phan is currently offline Quang Dao PhanFriend
Messages: 1
Registered: April 2012
Junior Member
I have exactly the same problem with MJT 1.1.2 and bouncycastle 1.47. I can create obfuscated package if i specify -libraryjars for ProGuard but in the output jar file, there is no class of bouncycastle. Any suggestion?

Previous Topic:Manual Installation Devices
Next Topic:Android application
Goto Forum:

Current Time: Tue May 28 11:59:49 GMT 2024

Powered by FUDForum. Page generated in 0.03857 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top