This article explains how "Obfuscation" can be used to optimise your code and make it harder to copy. It also lists some of the more important Java ME obfuscator software.
Obfuscation refers to "the deliberate act of non destructively changing either the source code of a computer program or machine code when the program is in some compiled or binary form, so that it is not easy to understand or read."
The use of an obfuscator for obfuscation is an integral part of the code optimization & security of the source code.
What does the obfuscator do?
- Reduces the code size
- Removes unwanted code
- Replaces large variable names with shorter ones
- Changes the code such it will not be understood by a 3rd person
The most commonly used obfuscators for Java ME are listed in the following sections
Proguard It is available as opensource, Proguard is the widely used obfuscator for Java ME. ProGuard is a free Java class file shrinker, optimizer, and obfuscator. It removes unused classes, fields, methods, and attributes. It then optimizes the bytecode. It then renames the remaining classes, fields, and methods using short meaningless names.