How to prevent can decompilation

I created a plug-in project in Eclipse, distributed as a jar. The user can take this jar and decompile it using JAD. Is there a way so that I can stop decompiling the jar file? Or at least to hide my source code from the user?

+4
source share
2 answers

If you do not paste the source code into the jar, your source code is not a decompiled decompiler, but something similar.

However, you can use obfuscator to decompile the code by creating very ugly code like Proguard .

ProGuard is a free piece of Java file, optimizer, obfuscator, and predictor. It detects and removes unused classes, fields, methods, and attributes. It optimizes bytecode and removes unused instructions. It renames the remaining classes, fields, and methods using short, meaningless names. Finally, it predefines the processed code for Java 6 or for Java Micro Edition.

Look for other products with the term obfuscator.

+3
source

The best way to stop can decompilation is to give users no reason to wish. Obfuscation is just a gang. In fact, some people will probably only turn him on a call if he is famous enough.

+3
source

Source: https://habr.com/ru/post/1384250/


All Articles