Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Embedding jode in a program

jode-users
2007-08-20
2013-05-02
  • Ed Thompson
    Ed Thompson
    2007-08-20

    I am trying to use JODE as an embedded decompiler, esposing it as an ANT class.

    If I include the whole JODE build as part of my project, a file gets generated.  If I use jode-1.1-embedded.jar instead, the same code generates an java.lang.NoClassDefFoundError for the class I am trying to decompile.

    The code is pretty straightforward:

    String outFile = "c:\\development\\eclipse_workspace_rad1\\TestEmbeddedJode\\tmp.java";
    String className = TestJode.class.getName();
    ProgressListener progress = null;
       
    FileWriter writer = new FileWriter(outFile);
    BufferedWriter bufWriter = new BufferedWriter(writer);
    Decompiler dc = new Decompiler();
    dc.decompile(className, bufWriter, progress);

    Any help appreciated.