Jad java反编译指令

This is README file for Jad - the fast Java Decompiler.

Jad home page: http://www.kpdus.com/jad.html

Copyright 2001 Pavel Kouznetsov (jad@kpdus.com).

0. Please read the disclaimer on the Jad home page.

  请在JAD主页阅读此免责声明;

1. Installation.

  安装.

Unzip jad.zip file into any appropriate directory on your hard drive.

  解压缩jad.zip到任意合适硬盘文件夹下。

This will create two files:

    创建两个文件夹:

    - an executable file named 'jad.exe' (Windows *)  可执行文件

      or 'jad' (*n*x)

    - this README file     

No other setup is required. 

不需要其他的设置

2. How to use Jad 

  怎么样使用JAD

To decompile a single JAVA class file 'example1.class' 

type the following:

下面介绍反编译一个简单的class文件

    jad example1.class

This command creates file 'example1.jad' in the current directory.

If such file already exists Jad asks whether you want to overwrite it or not.

Option -o permits overwriting without a confirmation.

这个指令在当前文件夹下创建'example1.jad'的文件

如果这样的文件已经存在,JAD会询问是否对此文件进行重写。

选项-o 允许重写不需要进行确认。

You can omit .class extension and/or use wildcards in the names of

input files.

对于输入文件名你可以省略 .class扩展或者利用通配符

Option -s <ext> allows to change output file extension:

  选项 -s允许改变输出文件扩展:

    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.

这个指令创建'example1.java'文件。特别注意当你同时使用-o和-s选项时,因为JAD会偶然重写你的资源文件。

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利用JAVA类的名字作为输出文件的名字。例如,如果'example1.class'文件中包含JAVA类'test1',Jad会创建文件名字为'test1.jad'而不是'example1.jad'。如果你想要指定具体输出文件名字可以使用输出重定向指令:

  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:

选项-d允许你为输出文件指定另外一个文件夹,此文件夹默认在当前文件夹下创建。

  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'.

这个指令反编译所有的class字节码文件并且把所有输出文件名添加.java扩展名然后放置在当前文件夹下的test文件夹下。

If you want to decompile the whole tree of JAVA classes,

use the following command:

如果你想反编译整个树型class字节码文件,请利用下面的指令:

  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 

'src/a/b/c.class' contains class 'c' from package 'a.b', then

output file will have a name 'src/a/b/c.java'.

这个指令反编译src所有树型子文件夹下所有class文件并且根据字节码文件的路径命名输出文件名字。 例如'src/a/b/c.class'包含字节码文件c,输出文件c.java就在'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处理,并不是指令脚本,所以在UNIX系统中后一个参数应该是使用单引号的

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

In a case you want to check the accuracy of the decompilation or just

curious, there is an option -a which tells Jad to annotate the output

with JAVA Virtual Machine bytecodes.

  万一你想要检查反编译的准确性或者仅仅是出于好奇,-a选项可以使Jad注释JAVA虚拟机输出的字节码。

Jad supports the inner and anonymous classes.

When Jad expands wildcards in the input file names,

it automatically skips matching inner classes.

On UNIX Jad skips inner classes if there is more than

one class specified in the command line.

Jad looks for inner classes in the directory of their top-level

container class.

  Jad支持内部类和匿名类。当Jad输入文件名字中扩展通配符,它会自动的跳过匹配内部类。在UNIX 如果在指令中超过一个指定的类Jad 会跳过内部类。

3. List of the command-line options.

  列举命令行指令

Jad accepts the following options: 

    Jad接受以下操作指令

  -a      - annotate the output with JVM bytecodes (default: off)

              注释虚拟机输出的字节码(默认:关闭)

  -af      - same as -a, but output fully qualified names when annotating

              和-a指令一致,注释时输出完全限定名称

  -clear  - clear all prefixes, including the default ones (can be abbreviated as -cl)

              清楚所有的前缀 包括默认的(可以被简写成 -cl)

  -b      - output redundant braces (e.g., if(a) { b(); }, default: off)

              输出多余的括号

  -d <dir> - directory for output files (will be created when necessary)

                创建输出文件夹(需要的时候被创建)

  -dead    - try to decompile dead parts of code (if any) (default: off)

              尝试反编译死亡的部分代码

  -disass  - disassemble method bytecodes (no JAVA source generated)

             

  -f      - output fully qualified names for classes/fields/methods (default: off)

              输出类 属性 方法 的完全限定名

  -ff      - output class fields before methods (default: after methods)

              在属性之前输出方法

  -i      - output default initializers for all non-final fields

              输出所有非final字段

  -l<num>  - split strings into pieces of maximum <num> chars (default: off)

              将字符串分割成最大的字符

  -lnc    - annotate the output with line numbers (default: off)

                注释输出带有行号

  -lradix<num> - display long integers using the specified radix (8, 10 or 16)

                    使用指定基数显示长整数

  -nl      - split strings on newline character (default: off)

                换行符分割字符串

  -nocast  - don't generate auxiliary casts

                不生成辅助代码

             

  -nocode  - don't generate the source code for methods

                不产生方法的源代码

  -noconv  - don't convert Java identifiers (default: convert)

                不转化java标识符

  -noctor  - suppress the empty constructors

                禁止空参构造

  -nodos  - do not check for class files written in DOS mode (CR before NL, default: check)

                不检查DOS模式下的字节码文件

  -nofd    - don't disambiguate fields with the same names by adding signatures to their names (default: do)

  -noinner - turn off the support of inner classes (default: on)

  -nolvt  - ignore Local Variable Table information

                忽略本地变量表格信息

  -nonlb  - don't output a newline before opening brace (default: do)

                大括号之前不输出换行符

  -o      - overwrite output files without confirmation (default: off)

              重写输出文件不需要确认

  -p      - send decompiled code to STDOUT (e.g., for piping)

  -pi<num> - pack imports into one line after <num> imports (default: 3)

  -pv<num> - pack fields with identical types into one line (default: off)

  -pa <pfx>- prefix for all packages in generated source files

  -pc <pfx>- prefix for classes with numerical names (default: _cls)

  -pf <pfx>- prefix for fields with numerical names (default: _fld)

  -pe <pfx>- prefix for unused exception names (default: _ex)

  -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)

  -r      - restore package directory structrure

                保存文件夹结构

  -radix<num> - display integers using the specified radix (8, 10 or 16)

                  使用指定的进制显示整数

  -s <ext> - output file extension (by default '.jad')

              输出文件名扩展

  -safe    - generate additional casts to disambiguate methods/fields (default: off)

              产生额外的转换消除方法和字段的分歧

  -space  - output space between keyword (if/for/while/etc) and expression (default: off)

                在关键字(if/for/while/etc)后输出空格键

  -stat    - display the total number of processed classes/methods/fields

              显示处理的总数 类/方法/字段

  -t      - use tabs instead of spaces for indentation

              利用tab代替空格键缩进

  -t<num>  - use <num> spaces for indentation (default: 4)

                利用空格键缩进

  -v      - display method names being decompiled

              显示已经反编译的方法名字

  -8      - convert UNICODE strings into 8-bit strings

              using the current ANSI code page (Win32 only)

  -&      - redirect STDERR to STDOUT (Win32 only)

              重定向标准对象输出

All single-word options have three formats:

  所有的单字符选项的3种格式:

  -o    - 'reverses' value of an option

          选项值得反置

  -o+  - set value to 'true' or 'on'

          设置参数“true”or"on"

  -o-  - set value to 'false' or 'off'

          设置参数“false”or "off"

You can specify the options you want to be set by default in the environment variable

JAD_OPTIONS.

你可以在JAD_OPTIONS环境中指定默认值选项

For example:

例如:

JAD_OPTIONS=-ff+ -nonlb+ -t+ -space+

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 216,544评论 6 501
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 92,430评论 3 392
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 162,764评论 0 353
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 58,193评论 1 292
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 67,216评论 6 388
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 51,182评论 1 299
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 40,063评论 3 418
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 38,917评论 0 274
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 45,329评论 1 310
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 37,543评论 2 332
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 39,722评论 1 348
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,425评论 5 343
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 41,019评论 3 326
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 31,671评论 0 22
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,825评论 1 269
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 47,729评论 2 368
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 44,614评论 2 353

推荐阅读更多精彩内容

  • 断断续续,拖拖拉拉花了三个礼拜读完了贾平凹先生的《秦腔》,这还得感谢中间坐火车那稍显寂寞的旅途的帮忙。拖沓...
    高祥阅读 417评论 0 1
  • 也是在整合redis的时候偶然间发现spring-cache的。这也是一个不错的框架,与spring的事务使用类似...
    阿卧阅读 1,177评论 0 11
  • 今天开始学习拼音的拼读了,孩子在大班的时候接触了一些,回来就给我读,前几天声调总是分不清,今天听着比前几天强多了,...
    漂洋过海的鱼_9a7f阅读 182评论 0 1