File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java Micro Edition and the fly likes Obfuscating Package Names Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Obfuscating Package Names " Watch "Obfuscating Package Names " New topic

Obfuscating Package Names

Oghie Ojior

Joined: Jun 11, 2002
Posts: 15
Is there a way to configure Antenna or ProGuard/Ant to obfuscate package names? I am able to obfuscate class names but not package name with my current configuration. I require the package names to also be obfuscated to include classes from optional packages that contain java and javax in their package names.

Thanks in advance
lexander Bosco
Ranch Hand

Joined: Feb 21, 2005
Posts: 65
ojior how u doing

sorry dat am asking a question instead of an answer
but b4 i ask ur packages that u want to include are they in the lib folder of your application? if they are they shouldbe included in the obfuscated jar file.

ok! i want to actually know how to run the progaurd obfuscator in my J2ME wireless toolkit.
i followed the installation instructions and yet it complains to me whenever i run it to obfuscate my application.
it complains that my application jar-size in the app descriptor is not the same with the un-obfuscated jar size .
i have tried progaurd obfuscator and retroguard.
i cant really tell what to do .
what do you suggest?

there is no knowledge that is not power<br />-<br />SCJP 1.4<br />SCWCD in progress<br />SCMAD in progress
Oghie Ojior

Joined: Jun 11, 2002
Posts: 15
Hi lexander:

I am using an ant script to compile and run my code against the Progaurd obfuscator. The classes get obfuscated but the package names do not, so I have a situation way java and javax packages remain in the jar I am trying to install. In my ant script the property midp_home points to my J2ME wireless toolkit directory.

Below is my ant script. Hope this helps.

Oghie Ojior

Joined: Jun 11, 2002
Posts: 15
FYI: I solved my problem by importing my code into NetBean and using its build facilities to compile, pre-verify, obfuscate and package the code.
I agree. Here's the link:
subject: Obfuscating Package Names
It's not a secret anymore!