Anil Kumar C
Anil Kumar C

Reputation: 1624

How to prevent my class to be decompiled

I don't want my class to be decompiled.

I have gone through some of the articles and found a patent site Zelix KlassMaster

Is there any free tools available in the market which works in the similar way..

Upvotes: 4

Views: 3384

Answers (8)

Ivan Kinash
Ivan Kinash

Reputation: 872

As far as I know there are no free tools with the same set of functions.

In my opinion the mix between ProGuard and Stringer Java Obfuscator is the best and also most cheap way to protect Java and Android applications.

N.B. I'm CEO at Licel LLC. Developer of Stringer Java Obfuscator.

Upvotes: 5

Ivan Nikitin
Ivan Nikitin

Reputation: 4123

I'm using Zelix Klassmaster for my app Visual Watermark for about two years now. No new program "cracks" were released since then. So, it seems a good option for protecting Java apps.

Upvotes: 0

user1396655
user1396655

Reputation: 31

Obfuscation is certainly a way to protect your code. Also, there are other tools which encrypt your classes and provide a custom classloader which can decrypt and load your class at runtime. This is not a very foolproof way but yes there are tools doing that.

Upvotes: 1

transilvlad
transilvlad

Reputation: 14532

Unfortunately in Java like in JavaScript getting to the source code is easy. Understanding it is another thing. If you try hard enough and send date through dozens of functions each doing a small part and passing it along then obfuscating it and maybe add some fake functions you might just give enough head eke to those with ill intentions enough of a head eke that they will quit before succeeding.

Upvotes: 0

Drona
Drona

Reputation: 7234

Proguard is the best available free and open source obfuscator. Obfuscators jumble your class, field and method names so that it becomes difficult to make sense out of the decompiled code.

Zelix Klassmaster is a commercial obfuscator and is one of the best in the commercial space. Also, it has some additional feature to encrypt the string constants to that the strings arent visible when decompiled. There are also some other commercial tools like yguard, DashO-pro, Allatori and Smokescreen etc.

Upvotes: 4

dty
dty

Reputation: 18998

You can't specifically stop it being decompiled. After all, a decompiler only has to be able to read the byte code to turn it into source code, and reading the byte code is also what the JVM has to do. So if you were to come up with some way to prevent programs from reading the byte code, the JVM wouldn't be able to run your class.

As others have pointed out, obfuscation is the way to go if you REALLY need to do this, but I would question whether you really do need to. It's also worth pointing out that if you do use obfuscation, finding bugs will be much harder because stack traces will also be obfuscated.

Upvotes: 1

Zeemee
Zeemee

Reputation: 10704

You can't prevent a java class from beeing decompiled. However, you can make the life of someone who will try to understand your code very very hard. This is the task of a so called obfuscator, like KlassMaster.

Please see this list for Open Source obfuscators.

Please see also one of my questions: https://stackoverflow.com/questions/1872170/how-to-protect-intellectual-property-in-java-app

Upvotes: 0

Jigar Joshi
Jigar Joshi

Reputation: 240870

You can obfuscate your code, so that when it de compiles it isn't easy to read (for programmer)

Upvotes: 1

Related Questions