我正在寻找具有Maven插件支持的Java混淆器?我们尝试使用ProGuard,但遇到一些运行时问题,如果您不混淆,则不会发生。是否有其他混淆器。
由于ProGuard的运行方式与大多数其他Java混淆器(至少是我所熟悉的混淆器)相似,因此很可能会遇到类似的问题。(实际上,ProGuard不遗余力地发出兼容的字节码,而其他一些混淆器对此则保持警惕。)
What sort of problems were you having? Typically the issues with using obfuscation are with name mangling - running into problems with other libraries being unable to locate public classes / methods / fields, or problems using reflection. This is often solveable by being very careful about which class names and method names you allow to be mangled.
The last time I used obfuscation on a Java project, we were fairly conservative about what was obfuscated. We placed the classes we wanted obfuscated into a subpackage of their original package called 'internal', and we obfuscated only .internal.. We found this much more usable than trying to determine what not to obfuscate.
Another issue with obfuscators is their optimization. Although I've not seen bugs from optimization in ProGuard, it's certainly not impossible. Regardless, I turn this off for a few reasons: first, when you get an (obfuscated) stack trace for a customer, it's hard enough to unmangle the names to determine what went wrong. If your obfuscator has optimized anything, that stack trace is likely meaningless. Second, it's unnecessary: the JVM is very, very good at optimizing byte code and this is interfering with that (thus potentially making it worse.)
| 归档时间: |
|
| 查看次数: |
3805 次 |
| 最近记录: |