是否可以使用 ProGuard 来缩小 rt.jar?

发布于 2024-08-28 10:29:31 字数 255 浏览 6 评论 0原文

是否有一个过程可以让您通过使用 ProGuard(或其他?)等优化软件来仅优化/收缩/选择/混淆 Sun 提供的 rt.jar 中“由您的应用程序使用”的类/方法/字段。那么您实际上能够大大减少应用程序的下载大小并使其更加安全吗?正确的?

相关问题:

  • 您是否知道Sun正在等待推出的“拼图项目”是否旨在自动处理这个特定问题?
  • 有人还没有对 Avian java 替代方案形成意见吗?请在这里分享。

谢谢。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

停滞 2024-09-04 10:29:31

来自 ProGuard 网站

Sun Java 6 的运行时类

原始大小:53M

收缩后:23M

优化后:22M

混淆后:18 M

总减少量:66%

我最近刚刚看到应用程序 Pack200,这似乎是 Jigsaw 项目将对 Java/JRE (7)进行

模块化,以便仅加载所需的模块。

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.

等风也等你 2024-09-04 10:29:31

Sun/Oracle JRE 二进制许可证不允许对 Java 运行时进行子集化,或摆弄 rt.jar。将 JRE 与应用程序捆绑在一起时,您可以删除一些可选文件,但这不会产生太大影响。

因此,等待 JDK 7 或探索 Sun 批准的方法来减少Java 应用程序的下载大小。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文