4 using an obfuscator, Using an obfuscator – Sun Microsystems J2ME User Manual

Page 27

Advertising
background image

Chapter 2

Developing MIDlet Suites

15

FIGURE 12

Launching the installed application

Running an application on a real device depends heavily on the device itself.
Consult your device documentation for information.

2.4

Using an Obfuscator

An obfuscator is a tool that reduces the size of class files. MIDlet suites need to be
compact, both to minimize download times and to comply with sometimes
stringent limits on JAR size imposed by manufacturers or carriers. Using an
obfuscator is one way (not the only way) that you can keep your MIDlet suite JAR
small.

You can use an obfuscator in the packaging step of the development cycle.
Although the J2ME Wireless Toolkit doesn’t come with an obfuscator, it is already
configured to use the ProGuard obfuscator. All you need to do is download
ProGuard and put it in a place where the toolkit can find it.

ProGuard is published under the terms of the GNU General Public License (GPL).
If you are comfortable with the terms of the license, you can download and use
ProGuard free of charge.

Installing ProGuard in the J2ME Wireless Toolkit is straightforward:

1. Go to the ProGuard web site,

http://proguard.sourceforge.net/

.

2. Download the latest version.

Advertising