rt.jar put on a Proguard diet losses 26 MB
Jeff Palmer
jcpalmer at rochester.rr.com
Sun Dec 16 15:33:33 PST 2012
Michael,
Sorry, I did not fully read your reply. Knowing that Oracle does not compress from Alan was all I needed, cause I know Proguard compresses, just not to what level. As far as what you said:
> Mine isn't compressed and isn't showing name obfuscation, which if you were real clever might get you what amounted to compression by just shortening the names as part of the obfuscation.
Shrink wrapping rt. jar right into the app would be incredibly small, but find all the dynamic reflection calls & making sure those class name do not change get changed would be difficult. Avian seems to say they are doing it though. This is worthless for Java Webstart replacement purposes though.
You could also get a similar effect, but write it out as separate jars, one for your app & rt. jar. Both of these would not allow the user of your application to replace the library & have it still work. Licensing issue if someone wants to make a scene.
You can use settings documented for processing libraries though. I tried them and got a 4000 KB reduction. What happened was all the big private variables names were shrunk down to a single letter. If did not work though, a couple of class names in the invoke package still got obfuscated. It was fatal.
FYI, The biggest bang for the buck is repackaging everything down so a single char package like '_'. The package path is bigger than the class names so shrink is very large, & for obfuscation purposes it is a complete incomprehensible mess.
Jeff Palmer
WhatIf Squared LLC
More information about the macosx-port-dev
mailing list