Method: 1. Download the "jad.exe" plug-in and place it in the same directory as the ".class" file; 2. Open the cmd command window and use the cd command to enter the directory where "Jad.exe" is located. ;3. Execute the "Jad -d java file storage path -sjava class file path" command.
The operating environment of this tutorial: windows7 system, java8 version, DELL G3 computer.
jad.exe decompilation plug-in
The download address can be found at:
https://varanekas.com/jad/
ttp://pan.baidu.com/s/1qWmNlww
Explanation
Operation
Place jad.exe and .class files in the same directory (not necessary, optional, will be discussed later Explanation) Start-Run (or Win R)-cmd to open the system command window and enter the directory where Jad.exe is located For example:f: cd F:\JadEnter the command
Jad -d F:\Jad\test -sjava test\*.class Press Enter to generate the Java file
Jad -d F:\Jad\test -sjava test\*.class
Remarks: *.class * is a wildcard character, this directory is selected by default Download all .class files. If you only need to decompile a certain .class file, you can directly write the file name .class
Jad -d F:\Jad\test -sjava test\CaseInfoSaveAction. class
Jad command--Help prompt:
-a - Use JVM byte format to annotate the output -af - Same as -a, But use the full name when annotating
-clear - clear all prefixes
-b - output extra brackets (e.g., if(a) { b(); }, default: no)
-d - Specify the file directory of the output file
-dead - Attempt to decompile the dead part of the code (default: no)
-disass - Do not use bytecode to decompile (no JAVA source generated )
-f - Output the entire name, whether it is a class or a method
-ff - Output the members of the class before the method (default: after methods)
-i - Output the default of all variables Initial value
-l- Split strings into the specified number of blocks of characters (default: no)
-lnc - Annotate the output file with line numbers (default: no)
- nl - split strings using newline character (default: no)
-nodos - do not check whether the class file is written in dos mode (CR before NL, default: check)
-nocast - do not generate auxiliary files
-nocode - Do not generate method source code
-noconv - Do not convert java definers (default: do)
-noctor - Do not allow empty constructors to exist
-noinner - Turn off Support for inner classes (default: turn on)
-nolvt - Ignore table information for local variables
-nonlb - Do not output a newline before opening a parenthesis (default: do)
-o - Overwrite output without confirmation (default: no)
-p - Send decompiled code to standard output STDOUT (e.g., for piping)
-pa - Prefix used to generate all packages in the source file
-pc - prefix for classes with numeric names (default: _cls)
-pe - prefix for exception names not used (default: _ex)
-pf - prefix for fields with numeric names (default) :_fld)
-pi - use.
-pl - Prefix for local variables with numeric names (default: _lcl)
-pm - Prefix for methods with numeric names (default: _mth)
-pp - Prefix with numeric names Method parms prefix (default: _prm)
-pv - Pack fields with the same type into one line (packfields)
-r - Restore package directory structure
-s - Output file extension (default: .jad)
-space - output space between keywords (if, while, etc.) and expressions
-stat - displays the total number of classes/methods/fields processed
-t - uses spaces Indent (default: 4)
-t -Use tabs instead of spaces for indentation
-v -Display method names during decompilation
Recommended related video tutorials: Java video tutorial
The above is the detailed content of How to decompile class files into java files. For more information, please follow other related articles on the PHP Chinese website!