I've been staring at this issue for hours now. Any help is appreciated.
I wrote code that uses the Jode decompiler from the "embedded jode jar file". I want to use this version because it is under the Lesser GNU Public License.
Decompiler d = new Decompiler();
try {
FileWriter fw = new FileWriter("c:\\jode.txt");
d.setClassPath("C:\\mycode");
ProgressListener p = new ProgressListener() {
public void updateProgress(double arg0, String arg1) {
System.out.println("inside of progress listener with arg0 = " +arg0+ " and arg1 = " +arg1);
}
};
d.decompile("Test.class" , fw, p);
} catch (Exception ex) {
ex.printStackTrace();
}
and I always get :
Exception in thread "main" java.lang.NoClassDefFoundError: Test.class
at jode.bytecode.ClassInfo.loadInfo(ClassInfo.java:620)
at jode.decompiler.ClassAnalyzer.<init>(ClassAnalyzer.java:86)
at jode.decompiler.ClassAnalyzer.<init>(ClassAnalyzer.java:123)
at jode.decompiler.Decompiler.decompile(Decompiler.java:191)
at testdecompiler.Main.main(Main.java:45)
If I use
jode.decompiler.Main.decompile(...)
things work - but I can't use this class file because it resides in the jode.jar that is only GPL.