Decompiling an entire Java Archive (Jar) file into its constituent source code can be a useful task for understanding or modifying codebases. While many decompilers can handle individual classes, here are some options that can decompile entire Jar files:
Vineflower is a fork of Quiltflower, which is a modern, general-purpose decompiler focused on improving code quality, speed, and usability. It supports modern language features and provides more configurability, error messages, and optimization than earlier decompilers.
To decompile an entire Jar file with Vineflower, use the following command:
java -jar vineflower.jar -dgs=1 c:\Temp\binary\library.jar c:\Temp\souce
JavaDecompiler is a free and open-source decompiler that can handle Jar files. It displays all files within the Jar file and produces readable source code.
JD-Core is a fork of JD-Eclipse, which is actively maintained and provides high-quality decompilations. It supports a wide range of Java versions and features.
To decompile an entire Jar file with JD-Core, use the following command:
java -jar jd-core-jar.jar c:\Temp\binary\library.jar c:\Temp\source
Fernflower, which is the engine behind IntelliJ IDEA's decompiler, is available as a standalone library. It can be used to decompile Jar files, producing high-quality source code.
To decompile an entire Jar file with Fernflower, use the following command:
java -jar fernflower.jar -hes=0 -hdc=0 c:\Temp\binary\ -e=c:\Java\rt.jar c:\Temp\source\
Jdec is a cross-platform decompiler that works well with Jar files. It provides various options for controlling the decompilation process and produces readable source code.
The above is the detailed content of How to Decompile Entire Jar Files: Which Tools Should You Use?. For more information, please follow other related articles on the PHP Chinese website!