A professional C++ utility for inspecting and decompiling Java JAR files, designed for developers and security researchers who need to analyze compiled Java applications.
- Comprehensive Inspection: Extracts and lists all files within a JAR archive
- Configuration Detection: Automatically identifies plugin.yml and pom.xml files
- Resource Extraction: Safely extracts all resources to a dedicated folder
- Source Code Decompilation: Uses CFR (Class File Reader) to decompile Java bytecode to readable source code
- Clean Output Structure: Organizes decompiled code, resources, and metadata in a structured dump folder
- Cross-Platform: Built with Windows compatibility in mind, using standard C++ libraries
- Operating System: Windows (uses Windows-specific APIs)
- Java Runtime Environment (JRE): Version 8 or higher (for CFR decompiler)
- CFR Engine:
cfr_engine.jarmust be present in the same directory as the executable - C++ Compiler: MSVC or MinGW with C++17 support
-
Download or clone the repository
-
Ensure
cfr_engine.jaris placed in the executable directory -
Compile the source code:
g++ decompiler/Decompiler.cpp -o decompiler.exe -std=c++17
Or using MSVC:
cl /EHsc /std:c++17 decompiler\Decompiler.cpp /link /out:decompiler.exe
decompiler.exe "path/to/your/file.jar"decompiler.exeWhen run without arguments, the tool will prompt for the JAR file path.
The tool creates a _dump folder alongside the input JAR with the following structure:
yourfile_dump/
├── file_list.txt # Complete list of all files in the JAR
├── resources/ # Extracted resources (configs, assets, etc.)
│ ├── plugin.yml # Plugin configuration (if present)
│ ├── pom.xml # Maven configuration (if present)
│ └── ... # All other extracted files
└── source_code/ # Decompiled Java source files
├── com/
├── org/
└── ... # Package structure
decompiler.exe "plugins/MyAwesomePlugin.jar"This will create plugins/MyAwesomePlugin_dump/ with:
- Extracted
plugin.ymlshowing plugin metadata - Decompiled source code revealing plugin logic
- All resource files (languages, configs, etc.)
decompiler.exe "lib/shaded-library.jar"For shaded JARs (where dependencies are bundled), the tool will:
- Warn if no plugin.yml is found (common in libraries)
- Extract all embedded resources
- Decompile all classes including shaded dependencies
- Verify the JAR file path is correct and quoted if it contains spaces
- Ensure the file exists and is accessible
- Confirm
cfr_engine.jaris in the same directory as the executable - Check that Java is installed and in your PATH
- Try running
java -versionto verify Java installation
- This is normal for library JARs or shaded applications
- Check
file_list.txtfor actual contents - The tool will still extract resources and decompile classes
- Decompiler Engine: Uses CFR (https://www.benf.org/other/cfr/) for high-quality Java decompilation
- File Handling: Uses C++17 filesystem library for robust path operations
- Memory Management: Efficient extraction and decompilation process
- Error Handling: Comprehensive error checking and user feedback
This project is provided as-is for educational and development purposes. Please ensure compliance with applicable laws and software licenses when decompiling third-party JAR files.
Contributions are welcome. Please ensure code follows C++ best practices and includes appropriate error handling.
- v9: Current version with improved inspection and resource extraction
- Enhanced file listing and configuration detection
- Better error handling and user feedback c:\Users\User\system\Documents\SystemManagement\README.md