Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 11 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
当谈到 J2ME 和混淆时,谨慎一点是值得的。 Proguard 是最好的选择,因为它已经开发了很多年,并且已经收到了许多错误修复。 我记得 2.X 和 3.X 之间的版本转换以及它如何破坏了我(当时的)雇主的许多构建。 发生这种情况的原因是,一些能够节省更多大小的更改在某些手机中也以微妙的方式破坏了类文件,而在其他手机和桌面 JVM 上则完全没有问题。
目前 Proguard 3.11 是混淆器中最安全的选择。 如果您不必支持非常旧的手机,4.XX 可能就可以了。
When it comes to J2ME and obfuscation it pays to be a bit cautious. Proguard is the best choice because of the many years it has been in development, and the many bugfixes that it has received. I remember the version transition between 2.X and 3.X and how it broke many of my (then) employer builds. This happened because some of the changes that enabled more size savings also broke the class files in subtle ways in some handsets, while being perfectly fine in others and on desktop JVMs.
Nowadays Proguard 3.11 is the safest choice in obfuscators. 4.XX is probably fine if you don't have to support very old handsets.
奇怪的是,没有人记得 ProGuard 不仅可以缩小和混淆代码,还可以优化。 最后的版本允许指定多个通道进行优化(默认情况下只有一个通道),我可以指定 9 个通道。
当我反编译我的类后,我几乎无法识别它们,ProGuard 重构了很多方法调用。 只需要对这个精彩的应用程序进行一些调整即可。 所以我认为 ProGuard 是可行的方法,只是不要忘记稍微调整一下。 它还有一个非常好的手册。
Strange that no one remembered that ProGuard can not just shrink and obfuscate the code, but optimize as well. The last versions allow to specify several passes for optimization (by default there is a single pass), I may specify, say, 9 passes.
After I decompile my classes I can hardly recognise them, ProGuard restructures a lot of method calls. All it takes is just a bit of tweaking this wonderful app. So I think ProGuard is the way to go, just don't forget to adjust it a little. It also has a very nice manual.
我也更喜欢 ProGuard,因为它的尺寸减小和混淆的广度 - 请参阅 http://proguard.sourceforge.net/。 除了下载速度之外,我不一定有尺寸限制,但还没有发现任何进一步缩小的东西。
I also prefer ProGuard for both it's size reduction and breadth of obfuscation - see http://proguard.sourceforge.net/. I don't necessarily have size constraints other than download speeds, but haven't found anything that shrinks further.