Welcome to Dream.In.Code
Become a Java Expert!

Join 149,483 Java Programmers for FREE! Get instant access to thousands of Java experts, tutorials, code snippets, and more! There are 1,383 people online right now. Registration is fast and FREE... Join Now!




Protect against Decompling in Java

 
Reply to this topicStart new topic

Protect against Decompling in Java

dragon-slayer
6 May, 2007 - 04:39 AM
Post #1

D.I.C Head
Group Icon

Joined: 6 May, 2007
Posts: 69


Dream Kudos: 100
My Contributions
Hello there,
I have seen that it is quite easy to decompile Java applications, is there a way to protect my java applications against getting decompiled.

Dragon-Slayer
User is offlineProfile CardPM
+Quote Post

GWatt
RE: Protect Against Decompling In Java
6 May, 2007 - 04:56 AM
Post #2

human inside
Group Icon

Joined: 1 Dec, 2005
Posts: 2,356



Thanked: 31 times
Dream Kudos: 500
My Contributions
You could use the JNI. You'll still have some Java code, but the implementation of the methods will be hidden. Of course, you have to know C/C++ for this.
User is online!Profile CardPM
+Quote Post

1lacca
RE: Protect Against Decompling In Java
6 May, 2007 - 10:58 AM
Post #3

code.rascal
Group Icon

Joined: 11 Aug, 2005
Posts: 3,822



Thanked: 12 times
My Contributions
QUOTE(GWatt @ 6 May, 2007 - 02:56 PM) *

You could use the JNI. You'll still have some Java code, but the implementation of the methods will be hidden. Of course, you have to know C/C++ for this.


But then there goes platform independence.


User is offlineProfile CardPM
+Quote Post

dragon-slayer
RE: Protect Against Decompling In Java
6 May, 2007 - 12:02 PM
Post #4

D.I.C Head
Group Icon

Joined: 6 May, 2007
Posts: 69


Dream Kudos: 100
My Contributions
thanks.
That rules out The JNI Option besides I dont know c/c++ ill try and find a solution,if i find a good one ill post back
User is offlineProfile CardPM
+Quote Post

GWatt
RE: Protect Against Decompling In Java
6 May, 2007 - 12:06 PM
Post #5

human inside
Group Icon

Joined: 1 Dec, 2005
Posts: 2,356



Thanked: 31 times
Dream Kudos: 500
My Contributions
QUOTE(1lacca @ 6 May, 2007 - 02:58 PM) *

QUOTE(GWatt @ 6 May, 2007 - 02:56 PM) *

You could use the JNI. You'll still have some Java code, but the implementation of the methods will be hidden. Of course, you have to know C/C++ for this.


But then there goes platform independence.


You can always compile three different libraries. (Windows, Linux, Mac)

If you don't like that option, you can write really obfuscated code so that no-one can understand it. That'll make debugging a pain in the @$$ though.
User is online!Profile CardPM
+Quote Post

1lacca
RE: Protect Against Decompling In Java
6 May, 2007 - 02:06 PM
Post #6

code.rascal
Group Icon

Joined: 11 Aug, 2005
Posts: 3,822



Thanked: 12 times
My Contributions
QUOTE(GWatt @ 6 May, 2007 - 10:06 PM) *

You can always compile three different libraries. (Windows, Linux, Mac)


BSD, Solaris, etc...

QUOTE(GWatt @ 6 May, 2007 - 10:06 PM) *

If you don't like that option, you can write really obfuscated code so that no-one can understand it. That'll make debugging a pain in the @$$ though.


True. But it will be the same big pain to maintian it...

However why do you want to obfuscate in the first place?

If you want to protect your algorythm, patent/copyright it.

If you want security by obfuscation, then usually there is a better way - public keys, whatever...

To hide business logic, shift as much of it as possible to the server.

Generally C/C++ and everything else is just as easy to decompile - although you have more options there (which have a counterattack, too), but as a general rule decoding/cracking an obfuscation takes only a fraction of time of creating one.
User is offlineProfile CardPM
+Quote Post

dleskov
RE: Protect Against Decompling In Java
18 Nov, 2008 - 01:05 AM
Post #7

New D.I.C Head
*

Joined: 18 Nov, 2008
Posts: 1

If you want to stick to Java and still protect your code from decompilers, check these out:

Protect Your Java Code - Through Obfuscators And Beyond

Java Bytecode Encryption Revisited
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/7/09 04:40PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Java Help!

Java Tutorials

Reference Sheets

Java Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month