Java Source Code obfuscator ( not bytecode obfuscator )

Hello,

I'm looking for an obfuscation tool that doesn't work on bytecode file but directly on the source code. It could seem a weird request, I'll explain my problem...

I developed a GWT Java application and I'm packaging it in a jar file for reuse and commercial distribution, GWT requires that a jar file containing a module must contain the .java files together with .class files for the client-side of the application. It is not easy protect the code in such context, the only thing I can do is obfuscate the source code but with a "lighter" obfuscation algorithm that preserves the public interface of my classes, the packages, the imports and all the parts of code that shouldn't be changed to make the code be compiled.

The tool i'm looking for should execute that "light obfuscation" task as an ant task before creating the jar file so that I can work over the code as usual...

could anyone help me?

[944 byte] By [Tmasia] at [2007-11-27 11:49:15]
# 1

GWT requires that the java source be sent to the client? Odd, any idea why? I don't know if what you want will be possible, since if GWT needs the source at the client, presumably it makes use of them. You'd have to provide a way for the obfuscation to be reversed at the other end, and without knowing more about how GWT works I'm not sure you could do that

I thought GWT just generated AJAX code for you

georgemca at 2007-7-29 18:24:07 > top of Java-index,Java Essentials,Java Programming...
# 2

I don't get it why you need this, but let's assume you need it.

What about obfuscating the byte-code, followed by a decompile?

baftosa at 2007-7-29 18:24:07 > top of Java-index,Java Essentials,Java Programming...
# 3

GWT does just generate AJAX for you, from what I've read. I'm not sure these classes and source files are sent to the actual browser, in which case, you probably don't have an issue here. Or am I missing something?

georgemca at 2007-7-29 18:24:07 > top of Java-index,Java Essentials,Java Programming...
# 4

http://www.semdesigns.com/Products/Obfuscators/JavaObfuscator.html

Prem_Sa at 2007-7-29 18:24:07 > top of Java-index,Java Essentials,Java Programming...
# 5

>GWT requires that the java source be sent to the client?

If you develop a GWT application you compile it and get javascript for the client-side of the application, you can obfuscate the javascript if you want ( I think the GWT compiler does that but I'm not sure ). no problems in that case.

The problem arise when you want to create a jar to reuse or distribute a GWT component! you MUST include the source code since it will be compiled by the GWT compiler in the "host" application.

If you want to read something about it check

http://roberthanson.blogspot.com/2006/05/how-to-package-gwt-components.html

So I want to include a source code that can be compiled in the "host" application but is obfuscated to protect the IP of the author...

Message was edited by:

Tmasi

Tmasia at 2007-7-29 18:24:07 > top of Java-index,Java Essentials,Java Programming...
# 6

> >GWT requires that the java source be sent to the

> client?

>

> If you develop a GWT application you compile it and

> get javascript for the client-side of the

> application, you can obfuscate the javascript if you

> want ( I think the GWT compiler does that but I'm not

> sure ). no problems in that case.

>

> The problem arise when you want to create a jar to

> reuse or distribute a GWT component! you MUST include

> the source code since it will be compiled by the GWT

> compiler in the "host" application.

> If you want to read something about it check

> http://roberthanson.blogspot.com/2006/05/how-to-packag

> e-gwt-components.html

> So I want to include a source code that can be

> compiled in the "host" application but is obfuscated

> to protect the IP of the author...

>

> Message was edited by:

> Tmasi

Aha

Looks like reply #4 is of some use to you, then

georgemca at 2007-7-29 18:24:07 > top of Java-index,Java Essentials,Java Programming...
# 7

> http://www.semdesigns.com/Products/Obfuscators/JavaObfuscator.html

thank you for the link I'll check it as soon as it is possible!

I think the tool i'm looking for is "java code formatter with obfuscation feature" and not "obfuscator"

Tmasia at 2007-7-29 18:24:07 > top of Java-index,Java Essentials,Java Programming...
# 8

> >http://www.semdesigns.com/Products/Obfuscators/JavaOb

> fuscator.html

>

> thank you for the link I'll check it as soon as it is

> possible!

>

> I think the tool i'm looking for is "java code

> formatter with obfuscation feature" and not

> "obfuscator"

That link looks to be a source code obfuscator, for when you need to send source to outside parties

georgemca at 2007-7-29 18:24:07 > top of Java-index,Java Essentials,Java Programming...
# 9

I've found that most programmers are better at writing obfuscated code than any obfuscator out there.

Therefore the best thing to do is just write the code yourself, noone will be able to comprehend it anyway :)

jwentinga at 2007-7-29 18:24:07 > top of Java-index,Java Essentials,Java Programming...