开发者

"undecompilable" source code in java [duplicate]

This question already has answers here: Closed 12 years ago. 开发者_Python百科

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


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


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

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


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.


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!


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜