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.
1. Tools/Materials
jad.exe decompilation plug-in
The download address can be found at:
https://varanekas.com/jad/
ttp://pan.baidu.com/s/1qWmNlww
##2. Method/step
Explanation
- Among the many JAVA decompilation tools, there are several very famous tools that use the same core Engine - JAD, which mainly includes: Front End
- Plus, mDeJava, Decafe Pro, Cavaj Java Decompiler, DJ Java
Decompiler, NMI's Java Class
Viewer and domestic JAVA source code decompilation experts, etc. . JAD itself is a command line tool without a graphical interface. Most of the above tools just add a graphical interface based on the JAD kernel. The common selection of so many products is enough to prove JAD's distinguished position in the field of JAVA decompilation.
Operation
Place jad.exe and .class files in the same directory (not necessary, optional, will be discussed later Explanation)f: cd F:\Jad
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!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Atom editor mac version download
The most popular open source editor

Notepad++7.3.1
Easy-to-use and free code editor
