jad 1.5.8反编译工具使用说明 java反编译工具jad 1.5.8g,可以反编译jdk 1.5,jdk 1.6 反编译工具jad简单用法 以下假设jad.exe在c:\java目录下
一、基本用法 Usage: jad [option(s)] <filename(s)> 直接输入类文件名,且支持通配符,
如下所示。 C:\java>jad Test.class 或者c:\java\>jad *.class 结果是将Test.class反编译为Test.jad。将Test.jad改为Test.java即得源文件。
二、Option -o 不提示,覆盖源文件(就是第二次反编译时不提示直接覆盖)
三、Option -s c:\java\>jad -sjava Test.class 反编译结果以.java为扩展名。 (注意命令:-sjava)
四、Option -p 将反编译结果输出到屏幕 c:\java\>jad -p Test.class 将反编译结果重定向到文件 c:\java\>jad -p Test.class>Test.java (反编译后直接到Test.java的目录下)
五、Option -d 指定反编译的输出文件目录
六、Option -r - restore package directory structure
Options: -a - generate JVM instructions as comments (annotate)
-af - output fully qualified names when annotating
-b - generate redundant braces (braces)
-clear - clear all prefixes, including the default ones
-d <dir> - directory for output files
-dead - try to decompile dead parts of code (if there are any)
-dis - disassembler only (disassembler)
-f - generate fully qualified names (fullnames)
-ff - output fields before methods (fieldsfirst)
-i - print default initializers for fields (definits)
-l<num> - split strings into pieces of max <num> chars (splitstr)
-lnc - output original line numbers as comments (lnc)
-lradix<num>- display long integers using the specified radix
-nl - split strings on newline characters (splitstr)
-noconv - don't convert Java identifiers into valid ones (noconv)
-nocast - don't generate auxiliary casts
-noclass - don't convert .class operators
-nocode - don't generate the source code for methods
-noctor - suppress the empty constructors
-nodos - turn off check for class files written in DOS mode
-nofd - don't disambiguate fields with the same names (nofldis)
-noinner - turn off the support of inner classes
-nolvt - ignore Local Variable Table entries (nolvt)
-nonlb - don't insert a newline before opening brace (nonlb)
-o - overwrite output files without confirmation
-p - send all output to STDOUT (for piping)
-pa <pfx>- prefix for all packages in generated source files
-pc <pfx>- prefix for classes with numerical names (default: _cls)
-pe <pfx>- prefix for unused exception names (default: _ex)
-pf <pfx>- prefix for fields with numerical names (default: _fld)
-pi<num> - pack imports into one line using .* (packimports)
-pl <pfx>- prefix for locals with numerical names (default: _lcl)
-pm <pfx>- prefix for methods with numerical names (default: _mth)
-pp <pfx>- prefix for method parms with numerical names (default:_prm)
-pv<num> - pack fields with the same types into one line (packfields)
-r - restore package directory structure
-radix<num>- display integers using the specified radix (8, 10, or 16)
-s <ext> - output file extension (default: .jad)
-safe - generate additional casts to disambiguate methods/fields
-space - output space between keyword (if, while, etc) and expression
-stat - show the total number of processed classes/methods/fields
-t<num> - use <num> spaces for indentation (default: 4)
-t - use tabs instead of spaces for indentation
-v - show method names while decompiling
-8 - convert Unicode strings into ANSI strings (ansi)
-& - redirect STDERR to STDOUT
C:\java>jad -sjava -r D:/aa/fect/web-inf/classes/com/**/*.class
解释:jad在C盘java目录下,然后在D:/aa/fect/web-inf/classes/com文件下面有好几层文件,里面存在很多*.class文件
-sjava是把文件反编译后修改后缀名为java,-r重新构造原文件的文件结构。 /**/*.class是在com文件下的所有子文件里的class文件。