开发者

Is it possible to shrink rt.jar with ProGuard?

Is there a procedure by which you can optimize/shrink/select/obfuscate only 'used by your app' classes/methods/fields from rt.jar provided by Sun by using some optimization software like ProGuard (or maybe other?). Then you would actually be able to minimize the download size of your application considerably and make it much more secure ? Right?

Related questions:

  • Do you know if Sun's "jigsaw project" which is waited to come out, is intended to automatically handle 开发者_运维知识库this particular issue?
  • Did somebody manage yet to form an opinion about Avian java alternative? Please share it here.

Thank you.


From the ProGuard Website:

the run-time classes from Sun's Java 6

Original size: 53 M

After shrinking: 23 M

After optim.: 22 M

After obfusc.: 18 M

Total reduction: 66 %

I've just recently seen apps Pack200, which seems to be something you might be interested in.

Project Jigsaw will modularize Java/the JRE (7), so that only modules needed are loaded.


The Sun/Oracle JRE Binary License does not permit subsetting the Java Runtime, or fiddling with rt.jar. There are a few optional files that you may remove when bundling the JRE with your app, but that won't make much difference.

So wait for JDK 7 or explore a Sun-approved way to reduce the download size of your Java app.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜