How to protect a java application from reverse-engineering or code stealing?

帅比萌擦擦* 提交于 2019-12-25 01:08:01

问题


I want to reveal my desktop java application to public, but I'm not sure how to protect it from reverse-engineering or source code stealing?

Is it possible to convert the application to an exe file? and if it is, wouldn't that be enough to protect it?


回答1:


If it's really worth someone's time to reverse engineer your source from the binary, they will. You might be able to make it slightly harder, but never impossible.




回答2:


You can use a Java Obfuscator such as ProGuard.

ProGuard is a free Java class file shrinker, optimizer, obfuscator, and preverifier. It detects and removes unused classes, fields, methods, and attributes. It optimizes bytecode and removes unused instructions. It renames the remaining classes, fields, and methods using short meaningless names. Finally, it preverifies the processed code for Java 6 or for Java Micro Edition.




回答3:


A Java executable and a native executable are both just a bunch of machine code (with optional annotations and stuff). So there's essentially no difference in terms of how easy it is to reverse-engineer.

If you are compiling with javac, you can use the -g:none flag to eliminate all debug info from being compiled into the executable.



来源:https://stackoverflow.com/questions/7045613/how-to-protect-a-java-application-from-reverse-engineering-or-code-stealing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!