Bicentric wrote:
Hmm, this idea may seem stupid, and probably wont work but...
What if I make a small C++ application and run the Java in there. And when I compile it I can hide the jar file somehow or have it converted into some file which is un-readable by the computer. I doubt this is possible tho :L
Well, in order to run Java code, you will need to have the standard jar. I suppose you could encrypt that jar and decrypt it at run-time, but that's not going to prevent anything.
Like weezl said, this is more or less a non-issue. But, if you're that worried about someone stealing your code, the best option is to abandon Java altogether and go for a native-compiled language like C++. The only way to get any sort of code security whatsoever is to not use a language that is compiled into bytecode and run by interpreter, and instead opt for native compilation. Note that, even then, it is possible to reverse-engineer software written in *any* language. C++ would do little more than make it more difficult.