Next-generation Java bytecode decompilation with intelligent code reconstruction
Features β’ Installation β’ Usage β’ Architecture β’ Contributing
- Overview
- Features
- Installation
- Usage
- Architecture
- API Configuration
- Advanced Features
- Screenshots
- Contributing
- License
Advanced Java Decompiler is a professional-grade tool designed to reconstruct readable Java source code from compiled .class files. Built with a modern JavaFX interface and powered by multiple decompilation backends, it offers unparalleled accuracy and flexibility.
| Feature | Traditional Decompilers | Advanced Java Decompiler |
|---|---|---|
| Multiple Backends | β Single engine | β Groq, Gemini, OpenRouter, Heuristic |
| Streaming Output | β Wait for completion | β Real-time streaming |
| Batch Processing | β JARs, ZIPs, Folders | |
| Dependency Graph | β Not available | β Interactive visualization |
| Auto-Refactoring | β Raw output | β Modern Java patterns |
| Plugin System | β Fixed | β Groovy-based extensibility |
| Token Management | β Manual limits | β Auto-truncation & routing |
-
Multi-Backend Support
- Groq: Fast, free-tier Llama 3.3 70B with streaming
- Gemini: Google's advanced models (2.0 Flash, 2.5 Pro)
- OpenRouter: Unified API access
- Heuristic: Instant offline ASM-based decompilation
-
Smart Auto Mode
- Automatically selects optimal backend based on:
- Code complexity analysis
- Token limit estimation
- Available API quotas
- Automatically selects optimal backend based on:
-
Token Limit Management
- Automatic bytecode truncation for large classes
- Pre-flight token estimation
- Intelligent routing to avoid rate limits
-
Professional Dark Theme
- VSCode/IntelliJ-inspired design
- High-contrast syntax highlighting
- Smooth animations and transitions
-
Dual View Modes
- Single View: Decompiled code only
- Diff View: Side-by-side bytecode β source comparison
-
Drag & Drop Support
.classfiles.jararchives.ziparchives- Entire folders
-
Interactive Dependency Graph
- Visual class relationship mapping
- Color-coded node types:
- π΅ Main class (cyan)
- π Custom dependencies (orange)
- βͺ Java standard library (gray)
- Hover highlighting
- Circular layout algorithm
-
Batch Processing
- Decompile entire JARs in one click
- Process folders recursively
- Aggregate results with class separators
-
Secure Mode
- Automatic secret redaction
- Pattern-based detection:
- API keys
- Passwords
- Tokens
- Connection strings
-
Local Processing
- Heuristic mode runs 100% offline
- No data sent to external servers
-
Plugin System
- Groovy-based post-processing scripts
- Located in
plugins/folder - Example:
deobfuscate.groovyfor name recovery
-
Auto-Refactoring Suggestions
- Modern Java patterns (Streams, Records, Switch Expressions)
- Inline comments with recommendations
- Toggle on/off per session
- Project Structure Export
- Maven-compatible layout
- Gradle-compatible layout
- Preserves package hierarchy
- Generates build files
| Requirement | Version | Download |
|---|---|---|
| Java | 17+ | Oracle JDK |
| Gradle | 7+ | Included (Wrapper) |
| API Keys | Optional | See API Configuration |
# Clone the repository
git clone https://github.com/Muhib-Mehdi/Advanced-Java-Decompiler.git
cd Advanced-Java-Decompiler
# Build the project
./gradlew build
# Run the application
./gradlew run# Use gradlew.bat instead
.\gradlew.bat build
.\gradlew.bat rungraph LR
A[Upload .class] --> B{Select Mode}
B -->|Auto| C[Smart Routing]
B -->|Groq| D[Fast Streaming]
B -->|Gemini| E[High Quality]
B -->|Heuristic| F[Instant Offline]
C --> G[Decompiled Code]
D --> G
E --> G
F --> G
G --> H{Export?}
H -->|Yes| I[Maven/Gradle Project]
H -->|No| J[Done]
| Mode | Speed | Quality | Requires API | Best For |
|---|---|---|---|---|
| Auto (Smart) | β‘β‘β‘ | ββββ | Optional | General use |
| Heuristic | β‘β‘β‘β‘β‘ | βββ | No | Quick inspection |
| Groq | β‘β‘β‘β‘ | ββββ | Yes | Real-time streaming |
| Gemini | β‘β‘β‘ | βββββ | Yes | Complex classes |
| OpenRouter | β‘β‘β‘ | ββββ | Yes | Unified access |
-
Launch Application
./gradlew run
-
Select Decompilation Mode
- Choose from dropdown menu
- Auto mode recommended for beginners
-
Upload File
- Drag & drop
.class,.jar,.zip, or folder - Or click "Upload" button
- Drag & drop
-
Configure Options
- βοΈ Secure Mode: Redact secrets
- βοΈ Show Refactoring Tips: Get modernization suggestions
-
View Results
- Toggle Diff View for bytecode comparison
- Click Dependency Graph for class relationships
- Use Export for project structure
graph TD
A[JavaFX UI] --> B[Decompiler Pipeline]
B --> C{Mode Selection}
C -->|Auto| D[Model Orchestrator]
C -->|Manual| E[Direct Backend]
D --> F{Token Check}
F -->|Within Limit| G[Groq/Gemini]
F -->|Too Large| H[Gemini Fallback]
E --> I[Selected Backend]
G --> J[Plugin System]
H --> J
I --> J
J --> K[Refactoring Advisor]
K --> L[Output]
| Component | Responsibility | Technology |
|---|---|---|
| UI Layer | User interaction, visualization | JavaFX 21 |
| Pipeline | Orchestration, caching | Java 17 |
| Backends | Code reconstruction | Groq, Gemini, OpenRouter |
| Analyzer | Bytecode parsing | ASM 9.7 |
| Plugins | Post-processing | Groovy 4.0 |
| Security | Secret redaction | Regex patterns |
Groq (Recommended - Free Tier)
Features:
- β Free tier available
- β Real-time streaming
- β Fast response times
β οΈ 12,000 token limit (auto-handled)
Setup:
- Get API key: console.groq.com/keys
- Add to
.env:GROQ_API_KEY=gsk_...
Google Gemini (High Quality)
Features:
- β Free tier available
- β Multiple model options (2.0 Flash, 2.5 Pro)
- β High accuracy
β οΈ Rate limits apply
Setup:
- Get API key: aistudio.google.com/app/apikey
- Add to
.env:GEMINI_API_KEY_1=...
OpenRouter (Unified Access)
Features:
- β Access to multiple models
- β Unified billing
β οΈ Paid service
Setup:
- Get API key: openrouter.ai/keys
- Add to
.env:OPENROUTER_API_KEY=sk-or-...
Create .env in project root:
# Choose ONE or more providers
# Groq (Fast & Free)
GROQ_API_KEY=gsk_your_key_here
# Gemini (High Quality)
GEMINI_API_KEY_1=your_key_here
# OpenRouter (Unified)
OPENROUTER_API_KEY=sk-or-your_key_hereNote: The application works offline with Heuristic mode even without API keys.
Create custom post-processing plugins in plugins/ folder:
// plugins/custom-formatter.groovy
def transform(String code) {
// Your transformation logic
return code.replaceAll("oldPattern", "newPattern")
}
return thisThe application includes a RAG-enhanced feedback system:
- Rate decompilation accuracy (1-5 stars)
- Provide corrections
- System learns from feedback
- Stored in
~/.aidecompiler/feedback.json
| Shortcut | Action |
|---|---|
Ctrl+O |
Open file |
Ctrl+S |
Save output |
Ctrl+D |
Toggle diff view |
Ctrl+G |
Show dependency graph |
Ctrl+E |
Export project |
Note: Screenshots showcase the professional dark theme and key features.
Contributions are welcome! Please follow these guidelines:
# Fork and clone
git clone https://github.com/YOUR_USERNAME/Advanced-Java-Decompiler.git
# Create feature branch
git checkout -b feature/amazing-feature
# Make changes and test
./gradlew test
# Commit with conventional commits
git commit -m "feat: add amazing feature"
# Push and create PR
git push origin feature/amazing-feature- Follow Java naming conventions
- Use 4-space indentation
- Add JavaDoc for public methods
- Keep methods under 50 lines
This project is licensed under the MIT License - see the LICENSE file for details.
- ASM Framework - Bytecode manipulation
- JavaFX - Modern UI framework
- Groq - Fast LLM inference
- Google Gemini - Advanced language models
Muhib Mehdi
β Star this repo if you find it useful!
Made with β€οΈ by Muhib Mehdi


