AF
HomeTagSubmit NotesAsk AnythingLoginSubscribe Us
AF
1. Feel Free to ask and submit anything on Anyforum.in and get satisfactory answer
2. Registration is not compulsory, you can directly login via google or facebook
3. Our Experts are looking for yours ?.



java-compiler: Prevent decompiling class file

prevent java class from being decompiled?

java x 209
compiler x 5
Posted On : 2017-04-17 09:24:12.0
profile rahul patil - anyforum.in rahul patil
34-30
up-rate
5
down-rate

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. Zelix KlassMaster, for example, can also scramble your code flow in a way that makes it really hard to follow and works as an excellent code optimizer.

Also many of the obfuscators are also able to scramble your string constants and remove unused code.

Another possible solution (not necessarily excluding the obfuscation) is to use encrypted JAR files and a custom class loader that does the decryption (preferably using native runtime library).

Third (and possibly offering the strongest protection) is to use native ahead of time compilers like GCC or Excelsior JET, for example, that compile your Java code directly to a platform specific native binary.

In any case You´ve got to remember that as the saying goes in Estonian "Locks are for animals". Meaning that every bit of code is available (loaded into memory) during the runtime and given enough skill, determination and motivation, people can and will decompile, unscramble and hack your code. Your job is simply to make the process as uncomfortable as you can and still keep the thing working.

References:

GCC- Click Here

excelsior JET- Click Here

Proguard Example- Click Here

Posted On : 2017-04-17 17:57:49
Satisfied : 1 Yes  0 No
profile Rishi Kumar - anyforum.in Rishi Kumar
523185518076
Reply This Thread
up-rate
4
down-rate



Post Answer
Please Login First to Post Answer: Login login with facebook - anyforum.in