Originally posted by Capablanca Kepler: How is the Security of Jar file is done?So that jar file can't be unjared and hence client won't decompile class files using some tool?Links or some information will be great.
It is not difficult to encrypt a jar file so no one (but only you, who has the secret key) can unjar it. But then such an encrypted jar is not of much value. Those who get this cannot use its classes. If your concern is that you jar will get unjarred, classes decompiled and your IP stolen then you can use code obfuscators. They do a decent job and are quite effective. A Google search for Java Code Obfuscators returns many good links.
Let me make another suggestion - forget about it. Obfuscation only keeps out friendly eyes. The unfriendly ones won't even lose 30 minutes to even the cleverest obfuscators. You add complexity, increase costs and make support difficult. It's a losing situation. If your IP is your Java code, you have no IP.