What is the best way to go about obfuscating Java code? [duplicate]

我是研究僧i 提交于 2021-01-19 08:23:08

问题


Possible Duplicate:
Best Java obfuscator ?

Well, I'm planning on releasing a Jar into the world but would prefer if the code was not readably available to anyone with a Java Decompiler as I want to control access to the program with usernames / auth codes etc.

After some Googling I haven't found any software to do this for me, so I was wondering what steps to take from here; if anyone can point me at any software or information on methodologies of obfuscation I would be grateful.

Cheers again Stack Overflow.


回答1:


There are many obfuscators around, ProGuard is one well known example. Try searching for "java obfuscator", google finds enough hits on that.




回答2:


It's not possible to prevent someone from decompiling your code. You can obfuscate it, but that's the best you can do.

The good news for you?

Nobody wants your code. It's probably not worth decompiling.

If companies like BEA don't prevent such a thing with WebLogic, I can't see why yours requires it. Release your JAR and sleep at night.




回答3:


Do not forget to encrypt the passwords using a hash algorithm. I would not rely on the obfuscator to protect the passwords.

And you can then probably skip the obfuscator all together as it will provide little, if any, additional protection.



来源:https://stackoverflow.com/questions/2943778/what-is-the-best-way-to-go-about-obfuscating-java-code

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