Thales' cellular IoT products business is now part of Telit Cinterion, find out more.

You are here

Telit Cinterion IoT Developer Community

How to obfuscate my Java Code. Benefits

FAQ, March 6, 2014 - 1:13am, 10625 views

Using an obfuscator with your j2me applications is convinient to be able to “obfuscate the code”, and to reduces the total “.jar” file size generated.

Take in consideration that you are programming an embbeded processor with small RAM and FLASH memory compared with a desktop computer.  

Using an obfuscator will reduce the use of FLASH memory, and especially the RAM memory.

To provide an idea, an application example takes around 130Kb without obfuscating and 80Kb obfuscating. You can see that the reduction is quite significant.

Where you can download an obfuscator:

Once the file has been downloaded then unzip it inside your Eclipse folder, for example


Then under Windows > Preferences > J2ME > Packaging > Obfuscation you can select the PATH:



Once selected, you can “compile” your file obfuscating it. Instead of making a “Create Package”, to do this we make a “Create Obfuscated Package”.

"it works, but an obfuscating error appeared"

This is because you need to specify the complete path to the JDK and you probably have a JRE. Under Window > Preferences > Java > Installed JREs you can select the appropriate JDK directory. In this case:



Hi ! Does the obfuscated code run faster or is there no difference?

Antero Markkula
Communication and Mechatronics

Enkom Active Oy –
Upseerinkatu 3 A, 02600 Espoo, Finland
Mobile: +358 400 411368
Office: +358 10 204 0000
Fax: +358 10 204 0010

Hi Antero,

The ofuscated code is always smaller than the original code. That's, the code ***** less memory and run faster



Somewhere over the rainbow!!! Looking for the Oz Land!!!


Alopez's picture