Reputation: 12134
I developed a desktop application in Java. I converted my code in the form of Executable jar (.jar) format. Here my problem is, this jar files easily extracted by winrar/winzip. My Java class files are visible to others and also i do De-compilation process using JAD my source code are visible to everyone. is any way to protect my source code from De-compileation process.
Upvotes: 5
Views: 5538
Reputation: 787
Put a password or licence check at start of application. With proper authentication, only user must be able to run the application further.
For password check, you should generate private-public key concepts. For licence, some installed software or attached hardware can be use to provide access.
Upvotes: 0
Reputation: 133560
As Jigar Joshi said you can obfuscate your jar file. Proguard is a good one. Here's the link to it. http://java-source.net/open-source/obfuscators. Alternately you can convert jar to exe using jar to exe converter. You can download it here. But you have to purchase it. http://www.regexlab.com/en/jar2exe/.
Upvotes: 1
Reputation: 240898
You can't 100% stop decompilation but you can obfuscate your code that will be hard to read once after decompilation
Upvotes: 3