我可以减小用 LWUIT 编写的 J2ME jar 的大小吗?
我使用 LWUIT 编写 J2ME 应用程序。完成应用程序后,jar 大小为 0.99Mb。这是一个可怕的大小,无法使用 NetBean IDE 6.9 模拟器进行调试。 NetBean IDE 6.9 中只有一个触摸模拟器可以运行,其他的没有足够的空间安装。但我用诺基亚 5530 和诺基亚 N85 测试了我的应用程序,使用效果很好。但其他 JVM 最低的手机无法运行该大小。如何减小 jar 的大小? LWUIT jar 大小(需要为我的应用程序添加 jar)是 700kb...
I write J2ME application with LWUIT. After I finished my application, jar size is 0.99Mb. That is terrible size and that cannot debug with NetBean IDE 6.9 emulator. Only one touch emulator in NetBean IDE 6.9 can run it and other are not sufficient space to install. But I test my application with Nokia 5530 and Nokia N85, that is good for use. But other lowest JVM mobile phone doesn't run that size. How can I reduce the size of jar? LWUIT jar size (need to add jar for my application) is 700kb...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用混淆来减小
jar
文件大小。在您的 netbeans 项目中将混淆级别设置为高
。然后清理并构建项目。现在查看jar
文件大小。将会减少。Use obfuscating for reducing the
jar
file size. Set the obfuscating level toHigh
in your netbeans project. And then clean and build the project. Now see thejar
file size. It will be reduce.混淆可能是一种方法,但我确信您不会使用 LWUIT 的所有功能,然后通过 jarOpt< 删除未使用的类/a> 应该有帮助。通常会将所有 jar 和类重新打包到一个具有最高压缩级别的 JAR 中。
Obfuscation may be the way but I'm sure you won't use all features of LWUIT then removing unused classes by jarOpt should help. And generally repack all jars and classes into one JAR with highest compression level.