Hi! I've trying a lot to obfuscate my classes in a JAR file that is downloaded by the client since is an applet. I run the ProGuard obfuscation tool and everything appears to work perfect, but when I un-jar the ProGuard generated JAR file and try to decompile the classes using "DJ Java Decompiler", it can decompile everything, meaning that no obfuscation was performed.
This is how my ProGuard parameters file looks like:
-injars vdisk.jar
-outjars vdiskobf.jar
-libraryjars "C:\plugins\sun.jar"
-libraryjars C:\j2sdk1.4.2_12\jre\lib\rt.jar
# Preserve all public applets.
-keep public class *
# Print out a list of what we're preserving.
-printseeds
The input jar, consist of two files, the first:
public class WebDavLink extends JApplet {
public void init() {
WebDavLinkManager wdlm = new WebDavLinkManager(this);
wdlm.opera();
}
}
And the second one:
package com.syc.web.applet.webdavlink;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.URL;
import java.net.URLConnection;
import javax.swing.JApplet;
import netscape.javascript.JSObject;
class WebDavLinkManager{
private JApplet jap = null;
WebDavLinkManager(JApplet jap){
this.jap = jap;
}
protected void opera(){
//... some code
}
private void downloadFile(String sourceURL, File targetFile) throws IOException {
//... some code
}
}
The problem is, as I stated before, that a decompiler can decompile both classes in the JAR that was suppoused to have them obfuscated.
Any help will be great!