“undecompilable” source code in java [duplicate]

╄→гoц情女王★ 提交于 2019-12-01 11:44:51

问题


Possible Duplicate:
Jar executable that cannot be decompiled

How can I make "undecompilable" source in java? I have a microedition app that has code that I need to hide Is it possible?

Thanks in advance


回答1:


You can't. See this question:
make your Jar not to be decompiled

Interesting-looking book on the subject:
http://apress.com/book/view/9781590592656




回答2:


You cannot make code undecompilable, you can only obfuscate it:

http://en.wikipedia.org/wiki/Obfuscated_code




回答3:


In short. You can obfuscate your code to make it difficult for someone to read it and reuse it. If that is what you want, it could also make it difficult for someone to see what it does. But not impossible.




回答4:


You can try obfuscation, but nobody will want to steal your sauce code anyway, so I guess it's more for peace of mind. When it comes down to it, everything is decompilable to a degree, otherwise operating systems wouldn't be able to run any programs!




回答5:


If you want your users to actually, you know, use the program, they need to be able to run the program. In order to be able to run the program, the CPU must be able to understand the program. CPUs are much stupider than humans, so this means that humans can understand the program, too.

If you obfuscate your program in such a way that it cannot be understood by humans, this also means that it cannot be executed.

If you don't want people to get access to your code, there is only one way: don't give it to them. Put it on a server and let your users connect to it via the network.

But all of that is completely unnecessary, since your code is automatically protected by copyright law anyway, which is much more powerful than any obfuscation.



来源:https://stackoverflow.com/questions/3797055/undecompilable-source-code-in-java

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