Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to protect or secure java code from decompiling [duplicate]

Tags:

java

I got a small doubt here. While we are generating any new application we used to deliver them as jar files. Now my question is are we able to decompile these jar files...? if yes how can I avoid that...? Please let me know, thanks in advance.

like image 671
Rakesh Avatar asked Sep 16 '13 12:09

Rakesh


2 Answers

Decompilation cannot be avoided. You can easily make the code hard to read. There are free libraries available to obfuscate the code. proguard.sourceforge.net

like image 126
user1401472 Avatar answered Oct 23 '22 12:10

user1401472


You can decompile jar files (have a look at jd-decompiler). You can't avoid it! You just make it harder to read it with an obfuscator. (have a look at SandMark)

or create a programm which loads a crypted version of yours at runtime into memory.

like image 43
Danny. Avatar answered Oct 23 '22 12:10

Danny.