Currently what I'm doing for speed/efficiency:
1. Compile (my Eclipse compiles on save)
2. JShrink GUI -> reopen "class" file, then save it as a JAR.
3. Pack200 the resulting JAR:
1
| pack200 -G -E9 -r G.pack200.jar G.jar |
4. Compare.
Sometimes I throw Proguard into the mix, but it tends to be pretty slow and annoying to use during development.
Proguard settings (Mac):
1 2 3 4 5 6 7
| -libraryjars "/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar" -injars "G.jar" -outjars "G.proguard.jar" -allowaccessmodification -overloadaggressively -defaultpackage '' -keep public class G extends java.applet.Applet |
Once I start getting closer to my byte budget, I'll probably have to experiment with some other compression techniques...