私はこの問題を何時間も見つめてきました。どんな助けでも大歓迎です。
「埋め込みjode jarファイル」からJode逆コンパイラを使用するコードを書きました。このバージョンは 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();
}
そして私はいつも得る:
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)
私が使用する場合
jode.decompiler.Main.decompile(...)
動作しますが、このクラス ファイルは GPL のみの jode.jar にあるため使用できません。