This repository provides documentation on how to inspect, extract, and decompile Java JAR files.
You can extract the contents of a JAR file using the unzip command:
unzip myfile.jar -d output_foldermyfile.jar– the JAR file you want to extractoutput_folder– the directory where files will be extracted
After extraction, you will see the folder structure of the JAR, including any .class files, resources, and the META-INF directory.
To view the Java source code from compiled .class files, you can use JD-GUI:
- Download and install JD-GUI.
- Open your JAR file:
jdgui classes.jar- Browse the packages and classes, and optionally export the source code.
unzip– standard utility to extract JAR/ZIP files- JD-GUI – Java decompiler GUI for
.classfiles