The Artima Developer Community
Sponsored Link

Java Answers Forum
how to protect class files from being decompiled?

9 replies on 1 page. Most recent reply: Mar 6, 2002 2:13 PM by Matt Gerrans

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 9 replies on 1 page
jawad

Posts: 1
Nickname: jawad
Registered: Mar, 2002

how to protect class files from being decompiled? Posted: Mar 5, 2002 6:45 AM
Reply to this message Reply
Advertisement
how can i secure my class files from being decompiled?


Surendra Gade

Posts: 2
Nickname: suri
Registered: Feb, 2002

Re: how to protect class files from being decompiled? Posted: Mar 5, 2002 7:26 AM
Reply to this message Reply
Run your code thru an obfuscator. There are several tools available in the market including free ones.

Surendra

Alain Ravet

Posts: 19
Nickname: aravet
Registered: Feb, 2002

Re: how to protect class files from being decompiled? Posted: Mar 5, 2002 1:43 PM
Reply to this message Reply
You'll plenty of links to Obfuscation solutions/tools here :
http://www.saffeine.com/links.jsp

Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: how to protect class files from being decompiled? Posted: Mar 5, 2002 2:58 PM
Reply to this message Reply
The Java Compiler Compiler? (JavaCC) - The Java Parser Generator comes with a sample that does obfuscation, as well. It is also free:

http://www.webgain.com/products/java_cc/

Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: how to protect class files from being decompiled? Posted: Mar 5, 2002 3:00 PM
Reply to this message Reply
Dang, there was a little TM superscript after "Java Compiler Compiler" that appears as a question mark above.

Bill Venners

Posts: 2284
Nickname: bv
Registered: Jan, 2002

Re: how to protect class files from being decompiled? Posted: Mar 6, 2002 12:39 AM
Reply to this message Reply
Sorry Matt, that's a bug. The preview is not completely WYSIWYG (What you see is what you get). It may have something to do with the fact that the preview text is just taken from the HTTP POST, but the actual message when posted for good is written to the database, then read from the database to display it on the topic page. I'm beginning to suspect something is happening to those funky characters either on the way into or out of the database.

It's on my list.

jawad bokhari

Posts: 2
Nickname: bokhari
Registered: Mar, 2002

Re: how to protect class files from being decompiled? Posted: Mar 6, 2002 2:07 AM
Reply to this message Reply
Thanks for great information.
Is there any processing overhead for VM if we use obfuscator?

Alain Ravet

Posts: 19
Nickname: aravet
Registered: Feb, 2002

Re: how to protect class files from being decompiled? Posted: Mar 6, 2002 2:51 AM
Reply to this message Reply
> Is there any processing overhead for VM if we use obfuscator?

Pay a short visit to Google :
http://www.google.com/search?sourceid=navclient&q=java+obfuscation+performance

Some products (Dash-O-Pro) announce performance improvment, next to the obfuscation.

Bill Venners

Posts: 2284
Nickname: bv
Registered: Jan, 2002

Re: how to protect class files from being decompiled? Posted: Mar 6, 2002 9:33 AM
Reply to this message Reply
Obfuscation makes decompiled classes harder for people to understand, but doesn't at all effect the VMs ability to use the class. So performance is not hurt. It can be helped, though, because one of the things obfuscation usually does is replaces long human-meaningful variable names with short meaningless ones. This also has the effect of reducing the size of class files, which means JAR files will download more quickly if they are flying across the network. This can also reduce the memory footprint of your running app, which can also potentially yield a performance improvement.

Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: how to protect class files from being decompiled? Posted: Mar 6, 2002 2:13 PM
Reply to this message Reply
One nifty thing in the JavaCC sample obfuscator is that it allows you to have list files where you list meaningful-sounding names for variables, methods etc., but, of course, they get randomly scattered in the code. So, you might have a method called getSquareRoot() that is really doing something entirely different. This increases the cognitive dissonance even more than all methods like O0010() and O0101(), etc. (it does names something like that, by default).

Flat View: This topic has 9 replies on 1 page
Topic: converting .class to .java Previous Topic   Next Topic Topic: Comparable Class (overiding)

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use