gasull
September 28th, 2008, 05:35 PM
JODE (Java Optimize and Decompile Environment) (http://jode.sourceforge.net/) seems to be the best Java decompiler available (http://www.program-transformation.org/Transform/DecompilationJodeTest#Conclusion). But the installation of JODE and JodeEclipse is far from straightforward:
NB: The JODE Makefile created a wrong executable that I needed to modify.
NB: The JodeEclipse plugin you get from the update server said at JodeEclipse website (http://blog.technoetic.com/open-source/jode-eclipse-plugin/) doesn't work (at least it didn't for me with Eclipse 3.4).
I decided to write this tutorial after successfully installing them.
Install Java Getopt: sudo aptitude install libgetopt-java
Download the JODE JAR file from SourceForge (http://sourceforge.net/project/showfiles.php?group_id=3790). We need just the .jar, not the .tar.gz.
Place the JODE JAR in /usr/local/share/java/:
sudo mkdir /usr/local/share/java #If it doesn't exists yet
sudo chmod 755 /usr/local/share/java
sudo cp jode-1.1.2-pre1.jar /usr/local/share/java/
sudo chmod 644 /usr/local/share/java/jode-*.jar
Create the jode executable:
sudo gedit /usr/local/bin/jode #Or with Vim, etc.
Write this in the editor:
#!/bin/bash
prefix=/usr/local
case $1 in
[Ss]wi*) CLAZZ=jode.swingui.Main; shift ;;
[Dd]ec*) CLAZZ=jode.decompiler.Main; shift ;;
[Oo]bf*) CLAZZ=jode.obfuscator.Main; shift ;;
*) CLAZZ=jode.decompiler.Main ;;
esac
#CP=`echo $CLASSPATH | sed s/:/,/`
CLASSPATH=${prefix}/share/java/jode-1.1.2-pre1.jar:/usr/share/java/gnu-getopt.jar:.
echo Executing: /usr/bin/java -classpath $CLASSPATH $CLAZZ $*
/usr/bin/java -classpath $CLASSPATH $CLAZZ $*
And give it the right permissions once the you close the file:
sudo chmod 755 /usr/local/bin/jode
We already have JODE installed. Now we get JodeEclipse plugin from SourceForge (http://sourceforge.net/projects/jodeeclipse).
Place the plugin into the Eclipse plugin directory:
sudo cp net.sourceforge.jode_1.0.6.jar /usr/lib/eclipse/plugins/
That's all. You might be interested also in installing the Bytecode Outline plugin from ASM ObjectWeb (http://asm.objectweb.org/eclipse/index.html), specially for those classes that JODE fails to decompile.
HTH.
NB: The JODE Makefile created a wrong executable that I needed to modify.
NB: The JodeEclipse plugin you get from the update server said at JodeEclipse website (http://blog.technoetic.com/open-source/jode-eclipse-plugin/) doesn't work (at least it didn't for me with Eclipse 3.4).
I decided to write this tutorial after successfully installing them.
Install Java Getopt: sudo aptitude install libgetopt-java
Download the JODE JAR file from SourceForge (http://sourceforge.net/project/showfiles.php?group_id=3790). We need just the .jar, not the .tar.gz.
Place the JODE JAR in /usr/local/share/java/:
sudo mkdir /usr/local/share/java #If it doesn't exists yet
sudo chmod 755 /usr/local/share/java
sudo cp jode-1.1.2-pre1.jar /usr/local/share/java/
sudo chmod 644 /usr/local/share/java/jode-*.jar
Create the jode executable:
sudo gedit /usr/local/bin/jode #Or with Vim, etc.
Write this in the editor:
#!/bin/bash
prefix=/usr/local
case $1 in
[Ss]wi*) CLAZZ=jode.swingui.Main; shift ;;
[Dd]ec*) CLAZZ=jode.decompiler.Main; shift ;;
[Oo]bf*) CLAZZ=jode.obfuscator.Main; shift ;;
*) CLAZZ=jode.decompiler.Main ;;
esac
#CP=`echo $CLASSPATH | sed s/:/,/`
CLASSPATH=${prefix}/share/java/jode-1.1.2-pre1.jar:/usr/share/java/gnu-getopt.jar:.
echo Executing: /usr/bin/java -classpath $CLASSPATH $CLAZZ $*
/usr/bin/java -classpath $CLASSPATH $CLAZZ $*
And give it the right permissions once the you close the file:
sudo chmod 755 /usr/local/bin/jode
We already have JODE installed. Now we get JodeEclipse plugin from SourceForge (http://sourceforge.net/projects/jodeeclipse).
Place the plugin into the Eclipse plugin directory:
sudo cp net.sourceforge.jode_1.0.6.jar /usr/lib/eclipse/plugins/
That's all. You might be interested also in installing the Bytecode Outline plugin from ASM ObjectWeb (http://asm.objectweb.org/eclipse/index.html), specially for those classes that JODE fails to decompile.
HTH.