jad反编译工具的使用

Jad调用参数如下:

Usage:    jad [option(s)] <filename(s)>
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
 

 

部分参数解释如下:

-8:     把Unicode编码的字符转换成ASCII输出,这样程序中的中文就会原样输出,而不是令人费解的uxxxx这种形式
-nl:     把字符串按照
切分输出,这样很长的字符串也不至于都放在一行,增强了可读性。

JAVA手机网[www.cnjm.net]

-ff:     把数据成员放在方法之前,这样就符合大家写程序的习惯了
-space:     在if, while等关键字和表达式之间加入空格,这是java的良好编程风格
-nonlb:     不在开大括号(也就是左大括号)前加回车,这是大部分java程序员的习惯风格,大家可以根据自己的习惯选用
经过这样的配置,jad输出的java代码几乎跟手写的没有什么两样

 

 

具体我的示例如下:

在DOS下进入jad目录后,敲入:

D:\My Document\download\jad>jad -d  D:\java -ff -nl -space -8 -nonlb -r -s java  E:\vbao\WEB-INF\classes\com\sztelecom\vbao\**\*.class

 

 

 

你可能感兴趣的:(jvm,编程,Web,ext,dos)