Results 1 to 2 of 2

Thread: HOWTO: install JODE Java decompiler and Jode Eclipse Plugin

  1. #1
    Join Date
    May 2006
    Beans
    Hidden!
    Distro
    Ubuntu 8.04 Hardy Heron

    Lightbulb HOWTO: install JODE Java decompiler and Jode Eclipse Plugin

    JODE (Java Optimize and Decompile Environment) seems to be the best Java decompiler available. 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 doesn't work (at least it didn't for me with Eclipse 3.4).


    I decided to write this tutorial after successfully installing them.

    1. Install Java Getopt:
      Code:
      sudo aptitude install libgetopt-java
    2. Download the JODE JAR file from SourceForge. We need just the .jar, not the .tar.gz.
    3. Place the JODE JAR in /usr/local/share/java/:
      Code:
      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
    4. Create the jode executable:
      Code:
      sudo gedit /usr/local/bin/jode #Or with Vim, etc.
      Write this in the editor:
      Code:
      #!/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:
      Code:
      sudo chmod 755 /usr/local/bin/jode
    5. We already have JODE installed. Now we get JodeEclipse plugin from SourceForge.
    6. Place the plugin into the Eclipse plugin directory:
      Code:
      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, specially for those classes that JODE fails to decompile.

    HTH.
    Last edited by gasull; September 29th, 2008 at 04:12 AM. Reason: typo

  2. #2
    Join Date
    Apr 2009
    Beans
    1

    Re: HOWTO: install JODE Java decompiler and Jode Eclipse Plugin

    Thanks very much, you save me a lot of time.


    How to build and install edge JODE

    junit package is a requirement to run tests
    Code:
    sudo aptitude install junit
    htp package is a requirement to build documentation
    Code:
    sudo aptitude install htp
    Check your java compiler version is at least 1.2
    Code:
    javac -version
    Download last svn trunk
    Code:
    svn co https://jode.svn.sourceforge.net/svnroot/jode/trunk/jode jode
    Go into downloaded directory
    Code:
    cd jode
    Build java files into class files
    Code:
    ant build
    Run tests to see everything is correct
    Code:
    ant test
    Build jar files
    Code:
    ant release-bindist
    Your newly created jode file is in
    release/jode-1.90-CVS/jode.jar

    Follow gasull instructions except that there is an important change.

    Note !

    Jode java classes are in net.sf.jode.* path.
    You must modify script to something like this:
    Code:
    !/bin/bash
    prefix=/usr/local
    
    case $1 in
      [Ss]wi*) CLAZZ=net.sf.jode.swingui.Main; shift ;;
      [Dd]ec*) CLAZZ=net.sf.jode.decompiler.Main; shift ;;
      [Oo]bf*) CLAZZ=net.sf.jode.obfuscator.Main; shift ;;
        *) CLAZZ=net.sf.jode.decompiler.Main ;;
    esac
    
    #CP=`echo $CLASSPATH | sed s/:/,/`
    CLASSPATH=${prefix}/share/java/jode.jar:/usr/share/java/gnu-getopt.jar:.
    #echo Executing: /usr/bin/java -classpath $CLASSPATH $CLAZZ $*
    /usr/bin/java -classpath $CLASSPATH $CLAZZ $*

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •