Protect Jar File
I will soon be releasing a jar file to a lot of people to use a program I am making but I want to know how to protect my files. I know that someone can just change the .jar extension to .zip and extract all the .class files and basically see the code that exists. Is there anyway to easily prevent this? I will be releasing my jar as a JApplet on webpage and possibly a desktop app if I can solve these issues.
Re: Protect Jar File
There are some trivial ways to keep people from looking at the logic of your code.
Obfuscation is one.
Another way would be to use a custom class loader, store your class files encrpypted and have your classloader decrypt them as they are read. This raises the difficulty level a bit but doesn't stop a programmer from creating a class file and then decompiling it.
If someone can get your jar file, they can extract and decompile your code.