[java] obfuscating code

Started by
10 comments, last by GameDev.net 18 years ago
are there any free programs that will let me obfuscate the code, or other alternatives..like creating classes only compatible with x86 or so tia Paul
Cosmic Keys to my Creations & Times
Advertisement
Quote:Original post by gorgorath
are there any free programs that will let me obfuscate the code,


ProGuard

Quote:Original post by gorgorath
like creating classes only compatible with x86 or so


I'm not sure possibly you can get something to put a class in an exe file, but this kinda defeats the point of JAVA.
You can use ProGuard, JODE or RetroGuard. You can use jsmooth to wrap your classes into an executable.

Please note that such actions are fairly childish, though, as your work is perfectly protected by copyright law and needs no other safeguards to be "yours".
I don't seem much point in doing that. What's the harm if someone gets a look at the source code? Even if you could obfuscate it, the same results could be reproduced without getting a look at the source code, or any reverse engineering at all. I think this falls into the "mostly pointless" category, as well as the "mostly futile" category.
Use of the obfuscators such as Proguard is:

- To discourage reverse engineering (i.e. unauthorised modification) of classfiles (It does make it quite a bit harder, but still not massively difficult).
- To reduce the size of .jar files - particularly important for J2ME games
- CAN make the application load faster - some obfuscators also do a certain amount of optimisation. I believe that proguard can inline some methods (and maybe constants), plus removes dead code.

Mark
Quote:Original post by markr
Use of the obfuscators such as Proguard is:

- To discourage reverse engineering (i.e. unauthorised modification) of classfiles (It does make it quite a bit harder, but still not massively difficult).
- To reduce the size of .jar files - particularly important for J2ME games
- CAN make the application load faster - some obfuscators also do a certain amount of optimisation. I believe that proguard can inline some methods (and maybe constants), plus removes dead code.

Mark

I believe you mean optimization with a 'z'.

And can't you just encrypt your .jar files?

And for optimizations javac does provide a few more now with jdk 1.5 than previously available.
Quote:Original post by Anonymous Poster
I believe you mean optimization with a 'z'.


Not all the world is American! Many of us (For example, Australia and the UK) spell it "optimisation". Another example is "colour", not "color".

I'm not sure why Americans had to be different but I guess thats the way they are.

Quote:Original post by Anonymous Poster
And can't you just encrypt your .jar files?


And what will decrypt these files. You'll need a key built into the software somewhere. In that case, it'll only prevent the most casual attempts at reverse engineering.
Quote:Original post by firesoft
Quote:Original post by Anonymous Poster
I believe you mean optimization with a 'z'.


Not all the world is American! Many of us (For example, Australia and the UK) spell it "optimisation". Another example is "colour", not "color".

I'm not sure why Americans had to be different but I guess thats the way they are.


yeah I was aware of the difference and why he chose to use s instead of z such as civilisation, neighbour, initialisation, etc...

I don't know why American English is different you'd have to ask the puritains. Personally I find the difference extremely annoying.

jonahrowley:
Good discussion on encrypting jars and the final conclusion there was that there is no 'standard' way to encrypt them.

I guess I was thinking of singed jar files. Thus creating a legal means from copyright protection. Still doesn't help though in the way of a very proprietary algorithm that you want to protect.
Dang it all forgot the alternate text for the hyperlink.
Discussion mentioned above!

This topic is closed to new replies.

Advertisement