It is wrong to decompile others' programs, but sometimes, for some reason, you have to decompile others' code, you need a tool. Xiaoying Java source code decompilation expert v1.4 development version is a good tool, but it can only decompile the programs compiled by JDK 1.4.2 and earlier versions, and JDK and later cannot be used, but you can download Jad. EXE to decompile class files one by one, but if there are dozens or hundreds of folders, And the directory is very deep, it will be troublesome, this provides a method to decompile the entire directory directly using the command line: Batch decompilation using Jad
Jad-o-r-sjava-d src bin/**/*. Class
SRC: indicates the reverse structure of the object.
Bin: indicates the start of a package.
Decompile all. Classes in BIN to SRC
How to decompile A. Class file into a. Java File
The simple usage of The Decompilation tool Jad is to put jad.exe in the C:/Java directory.
I. Basic usage: Jad [option (s)] directly enters the class file name and supports wildcards, as shown below.
C:/Java/> Jad example1.class C:/Java/> Jad *. Class: decompile example1.class to example1.jad.
Change example1.jad to example1.java to get the source file.
2. If option-O is not displayed, overwrite the source file
Iii. Option-s c:/Java/> Jad-sjava example1.class decompilation result with. Java as the extension.
4. Option-P outputs The Decompilation result to the screen C:/Java/> Jad-P example1.class redirects the decompilation result to the file
C:/Java/> Jad-P example1.class> example1.java
5. Option-D specifies the decompiled output file directory c:/Java/> Jad-o-Dtest-sjava *. Class