Eric has posted 8 posts at DZone. View Full User Profile

ProGuard Version 4.3 - Free Optimizer and Obfuscator

12.18.2008
| 4847 views |
  • submit to reddit
Location: 
http://proguard.sourceforge.net/

It is my pleasure to announce the release of ProGuard 4.3. ProGuard is a free Java class file shrinker, optimizer, obfuscator, and preverifier.

This release adds a number of exciting new features to each of the processing steps.

Most notably, the optimization step now merges classes, whenever possible. This feature is especially welcomed by developers for Java Micro Edition. Merging classes cuts down on the overhead of class files, thus saving a few precious bytes for constrained devices. The merging is fully automatic, although it is necessarily conservative in order not to break any code or inflate memory usage at run-time.

The optimization step now also replaces tail recursion calls by simple loops. Tail recursion has received some attention recently with the increased interest in functional languages. More advanced compilers of functional languages for the JVM already simplify these calls when compiling to bytecode. ProGuard achieves the same for ordinary Java code.

The optimization step now also performs a static single assignment analysis and more peephole optimizations.

The obfuscation step now accepts dictionaries for obfuscated class names and package names. The examples contain some dictionaries for fun with words in bytecode.

Finally, this release also fixes a number of bugs that have been reported on the previous versions.

ProGuard is distributed under the terms of the GPL. You can download the program, documentation, and examples from proguard.sourceforge.net.

 Enjoy!

 Eric Lafortune

0
Published at DZone with permission of its author, Eric Lafortune.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Jim Bethancourt replied on Thu, 2008/12/18 - 8:52pm

Hi Eric,

Do you  know if the bytecode produced by ProGuard will run on the Squawk Virtual Machine?  I'm going to start writing a protocol for the wireless radio on the Sun SPOT device, which runs the Squawk VM, over the Christmas - New Years vacation.  ProGuard would be incredibly helpful on this platform, especially since there is only 512 KB of RAM and 4 MB of flash memory available.

On another note, are there plans for a Maven 2 plugin?

 

Thanks,

Jim

Eric Lafortune replied on Fri, 2008/12/19 - 12:21pm

Hi Jim,

Processing code for constrained devices like Sun SPOT/Squawk is one of the typical applications of ProGuard, so yes, it should work without problems. ProGuard reads and writes standard Java bytecode. Furthermore, you can (must) specify the run-time libraries against which the code was compiled. ProGuard can thus be used for JME, JSE, JEE, and even Android, for anything from a single class to ten thousands of classes or more.

I think there may be one or two plugins for Maven on the internet, but I'm not planning to include one in the distribution. The distribution does contain an Ant plugin, a WTK plugin, and a GUI.

 Eric.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.