home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 February / PCWorld_2000-02_cd.bin / Software / TemaCD / njvc / _SETUP.1 / Readme.txt < prev    next >
Text File  |  1999-07-07  |  6KB  |  140 lines

  1. This is README file for Jad - the fast Java Decompiler.
  2. Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
  3. Copyright 1997-99 Pavel Kouznetsov (kpdus@geocities.com).
  4.  
  5. 0. Please read the disclaimer on the Jad home page.
  6.  
  7. 1. Installation.
  8.  
  9. Unzip jad.zip file into any appropriate directory on your hard drive.
  10. This will create two files:
  11.  
  12.     - an executable file named 'jad.exe' (Windows 95/NT)
  13.       or 'jad' (Linux)
  14.  
  15.     - this README file
  16.  
  17.  
  18. No other setup is required.
  19.  
  20. 2. How to use Jad
  21.  
  22. To decompile a single JAVA class file 'example1.class' 
  23. type the following:
  24.  
  25.      jad example1.class
  26.  
  27. This command will create file 'example1.jad' in the current directory.
  28. If such file already exists Jad asks if you want to overwrite it.
  29. Option -o allows overwriting without confirmations.
  30.  
  31. You can omit .class extension and/or use wildcards in the names of
  32. input files.
  33.  
  34. Option -s <ext> allows to change output file extension:
  35.  
  36.      jad -sjava example1.class
  37.  
  38. This command will create file 'example1.java'. Be careful when using
  39. options -o and -sjava together, because Jad can accidentally overwrite
  40. your own source files.
  41.  
  42. Jad uses JAVA class name as an output file name. For example, if class
  43. file 'example1.class' contains JAVA class 'test1' then Jad will create
  44. file 'test1.jad' rather then 'example1.jad'. If you want to specify
  45. your own output file name use output redirection:
  46.  
  47.    jad -p example1.class > myexm1.java
  48.  
  49. Option -d allows you to specify another directory for output files,
  50. which are created, by default, in the current directory. For example:
  51.  
  52.    jad -o -dtest -sjava *.class
  53.  
  54.    (or jad -o -d test -s java *.class, which has the same effect)
  55.  
  56. This command will decompile all .class files in the current directory 
  57. and place all output files with extension .java into directory 'test'.
  58.  
  59.  
  60. If you want to decompile the whole tree of JAVA classes, then
  61. use the following command:
  62.  
  63.    jad -o -r -sjava -dsrc tree/**/*.class
  64.  
  65. This command will decompile all .class files located in all 
  66. subdirectories of 'tree' and create output files in subdirectories
  67. of 'src' according to package names of classes. For example, if file 
  68. 'tree/a/b/c.class' contains class 'c' from package 'a.b' then 
  69. output file will have a name 'src/a/b/c.java'.
  70.  
  71. Note the use of 'two asterisks' wildcard ('**') in the previous
  72. command. It is handled by Jad rather then command shell, so on
  73. UNIX the last argument should be single-quoted:
  74.  
  75.    jad -o -r -sjava -dsrc 'tree/**/*.class'
  76.  
  77.  
  78. In case you want to check the accuracy of the decompilation or just
  79. curious, there is an option -a which tells Jad to annotate the output
  80. with JAVA Virtual Machine bytecodes.
  81.  
  82. Jad supports inner and anonymous classes. When Jad expands wildcards 
  83. in the input file names, it automatically skips matching inner classes. 
  84. On UNIX Jad skips inner classes if there is more than one class specified
  85. in the command line.
  86. Jad looks for inner classes in the directory of their top-level
  87. container class.
  88.  
  89. 3. List of the command-line options.
  90.  
  91. Jad accepts the following options:
  92.  
  93.    -a       - annotate the output with JVM bytecodes
  94.    -af      - same as -a, but outputs fully qualified names when annotating;
  95.    -clear   - clears all prefixes, including the default ones (can be abbreviated as -cl)
  96.    -b       - output redundant braces (e.g., if(a) { b(); }, default: no)
  97.    -d <dir> - directory for output files (will be created when necessary)
  98.    -dead    - try to decompile dead parts of code (if any) (default: no)
  99.    -disass  - disassemble method bytecodes (no JAVA source generated)
  100.    -f       - output fully qualified names for classes/fields/methods
  101.    -ff      - output class fields before methods (default: after methods)
  102.    -i       - output default initializers for all non-final fields
  103.    -l<num>  - split strings into pieces of maximum <num> chars (default: no)
  104.    -nl      - split strings on newline character (default: no)
  105.    -nodos   - do not check for class files in DOS mode (default: check)
  106.    -nocast  - don't generate auxiliary casts
  107.    -nocode  - don't generate the source code for methods
  108.    -noconv  - don't convert Java identifiers (default: do)
  109.    -noctor  - suppress the empty constructors
  110.    -noinner - turn off the support of inner classes (default: turn on)
  111.    -nolvt   - ignore Local Variable Table information
  112.    -nonlb   - don't output a newline before opening brace (default: do)
  113.    -o       - overwrite output files without confirmation (default: no)
  114.    -p       - send decompiled code to STDOUT (e.g., for piping)
  115.    -pi<num> - pack imports into one line after <num> imports (default: 3)
  116.    -pv<num> - pack fields with identical types into one line (default: no)
  117.    -pa <pfx>- prefix for all packages in generated source files
  118.    -pc <pfx>- prefix for classes with numerical names (default: _cls)
  119.    -pf <pfx>- prefix for fields with numerical names (default: _fld)
  120.    -pe <pfx>- prefix for unused exception names (default: _ex)
  121.    -pl <pfx>- prefix for locals with numerical names (default: _lcl)
  122.    -pm <pfx>- prefix for methods with numerical names (default: _mth)
  123.    -pp <pfx>- prefix for method parms with numerical names (default: _prm)
  124.    -r       - restore package directory structrure
  125.    -s <ext> - output file extension (by default '.jad')
  126.    -stat    - display the total number of processed classes/methods/fields
  127.    -t       - use tabs instead of spaces for indentation
  128.    -t<num>  - use <num> spaces for indentation (default: 4)
  129.    -v       - display method names being decompiled
  130.    -8       - convert UNICODE strings into 8-bit strings
  131.               using current ANSI code page (Win32 only)
  132.    -&       - redirect stderr to stdout (Win32 only)
  133.  
  134. All single-word options have three formats:
  135.  
  136.   -o    - 'reverses' value of an option
  137.   -o+   - set value to 'true' or 'on'
  138.   -o-   - set value to 'false' or 'off'
  139.  
  140.