Procyon
라이브러리의 com.strobel.decompiler.Decompiler
디 컴파일러를 사용하여 jar 파일에서 특정 클래스를 디 컴파일하려고합니다.프로 시온 : 특정 항아리 클래스 디 컴파일
이 내 현재의 접근 방식 :
// jar file containing foo.class and bar.class
JarFile myJar = new JarFile("my.jar");
// creating decompiler settings
DecompilerSettings settings = new DecompilerSettings();
// set type loader to jar file
settings.setTypeLoader(new JarTypeLoader(myJar));
StringWriter foo = new StringWriter();
Decompiler.decompile("com.myjar.foo", new PlainTextOutput(foo), settings);
System.out.print(foo.toString());
그러나 이것은 단지 인쇄하지 : 나는 클래스 로딩 my.jar
에서 클래스에 대한 뭔가를 놓친 확신 !!! ERROR: Failed to load class com.myjar.foo.
. (이것은 타입 로더를 설정함으로써 이루어질 것이라고 생각했다.)
실제 질문 : 어떻게 procyon decompiler 함께 jar 파일에서 특정 클래스를 디 컴파일합니까? (내 접근 방식에서 내가 뭘 잘못 했니?)
Greets, NopMind.