Do diffence

Java Decompiler 본문

Tech Tips

Java Decompiler

고포릿 2010. 4. 16. 01:38

Java Decompiler

http://java.decompiler.free.fr/

  • Eclipse plugin : 윈도우, 리눅스 등 지원

  • JD-GUI: 윈도우, 리눅스 등 지원

    • 와우 Nautilus 지원.
  • JAD에 비해 좀 더 깔끔한 코드 추출로 가독성이 좋아 보인다.

JAD

http://www.kpdus.com/jad.html

JAD UI : FrontEnd Plus

http://koji.tistory.com/entry/%EC%9E%90%EB%B0%94-%EB%94%94%EC%BB%B4%ED%8C%8C%EC%9D%BC%EB%9F%AC-Front-end-plus-2

Jad eclipse plugin

http://jadclipse.sourceforge.net/

JadClipse 3.3.0와 Eclipse 3.3.x Europa가 잘 동작함. ganymede 는 안됨...

참조

http://entireboy.egloos.com/3745250

http://bluelime.springnote.com/pages/141054

 

 

jadclipse error - default class viewer

3.4.x에서 문제 발생

jad-viewer-error.jpg

Go to Window > Preferences... > General > Editors > File Associations and make sure that the JadClipse Class File Viewer has the default file association for *.class files.

 

Jad Usage
'example1.class' 의 역컴파일
  1.      jad example1.class

'example1.jad'을 현재 디렉토리에 만들어지고, -o 옵션은 강제 덮어쓰기를 한다.

 

 -s <ext> 으로 결과 파일 확장자 변경
  1.      jad -sjava example1.class

 

 

 

This command creates file 'example1.java'. Be careful when using
options -o and -sjava together, because Jad can accidentally overwrite
your own source files.

Jad uses JAVA class name as an output file name. For example, if class
file 'example1.class' contains JAVA class 'test1' then Jad will create
file 'test1.jad' rather than 'example1.jad'. If you want to specify
your own output file name use the output redirection:

   jad -p example1.class > myexm1.java

Option -d allows you to specify another directory for output files,
which are created, by default, in the current directory. For example:

   jad -o -dtest -sjava *.class

   (or jad -o -d test -s java *.class, which has the same effect)

This command decompiles all .class files in the current directory
and places all output files with extension .java into directory 'test'.


If you want to decompile the whole tree of JAVA classes,
use the following command:

   jad -o -r -sjava -dsrc tree/**/*.class

This command decompiles all .class files located in all
subdirectories of 'tree' and creates output files in subdirectories
of 'src' according to package names of classes. For example, if file
'tree/a/b/c.class' contains class 'c' from package 'a.b', then
output file will have a name 'src/a/b/c.java'.

Note the use of the "two stars" wildcard ('**') in the previous
command. It is handled by Jad rather than the command shell, so on
UNIX the last argument should be single-quoted:

   jad -o -r -sjava -dsrc 'tree/**/*.class'

 

이 글은 스프링노트에서 작성되었습니다.