Convert Figma logo to code with AI

java-decompiler logojd-gui

A standalone Java Decompiler GUI

13,917
2,378
13,917
234

Top Related Projects

40,878

Dex to Java decompiler

IntelliJ IDEA Community Edition & IntelliJ Platform

1,993

This is the public repository for the CFR Java decompiler

4,990

An Open Source Java Decompiler Gui for Procyon

Unofficial mirror of FernFlower Java decompiler (All pulls should be submitted upstream)

6,287

smali/baksmali

Quick Overview

JD-GUI is a standalone graphical utility that displays Java source codes of ".class" files. It is designed to make it easier for developers to read and understand compiled Java bytecode by decompiling it back into readable Java source code. JD-GUI is part of the Java Decompiler project, which aims to develop tools to decompile and analyze Java 5 "byte code" and the later versions.

Pros

  • User-friendly graphical interface for easy navigation and viewing of decompiled Java code
  • Supports decompilation of JAR, ZIP, and WAR files
  • Offers features like searching, copying source to clipboard, and saving decompiled files
  • Regularly updated to support newer Java versions and improve decompilation accuracy

Cons

  • Decompiled code may not always be 100% accurate or identical to the original source code
  • Limited functionality compared to some commercial decompilers
  • May struggle with heavily obfuscated code
  • Not suitable for reverse engineering or bypassing software licenses

Getting Started

To use JD-GUI:

  1. Download the latest release from the GitHub releases page.
  2. Extract the downloaded archive.
  3. Run the executable file:
    • On Windows: Double-click jd-gui.exe
    • On macOS: Double-click JD-GUI.app
    • On Linux: Run jd-gui from the terminal

Once launched, you can drag and drop .class, .jar, .war, or .zip files into the JD-GUI window to decompile and view their contents.

Competitor Comparisons

40,878

Dex to Java decompiler

Pros of jadx

  • More actively maintained with frequent updates
  • Supports decompilation of Android APK files directly
  • Offers a command-line interface for batch processing

Cons of jadx

  • May struggle with heavily obfuscated code
  • Can be slower for large projects compared to jd-gui

Code comparison

jd-gui:

public class Example {
    public static void main(String[] args) {
        System.out.println("Hello, World!");
    }
}

jadx:

public class Example {
    public static void main(String[] args) {
        System.out.println("Hello, World!");
    }
}

In this simple example, both decompilers produce identical output. However, differences may become apparent with more complex code or obfuscated classes.

Additional notes

  • jd-gui focuses primarily on Java decompilation, while jadx targets both Java and Android applications
  • jadx provides a more modern user interface and additional features like searching across multiple files
  • Both tools are open-source and free to use, making them valuable resources for developers and security researchers
  • The choice between jd-gui and jadx often depends on the specific use case and personal preference

IntelliJ IDEA Community Edition & IntelliJ Platform

Pros of intellij-community

  • Comprehensive IDE with extensive features for Java development
  • Large and active community, frequent updates and improvements
  • Supports multiple languages and frameworks beyond Java

Cons of intellij-community

  • Larger codebase and more complex setup for contributors
  • Steeper learning curve for new developers
  • Heavier resource usage compared to lightweight tools

Code Comparison

jd-gui (Decompiler.java):

public class Decompiler {
    public static String decompile(byte[] classFile) {
        // Decompilation logic here
    }
}

intellij-community (JavaDecompiler.java):

public class JavaDecompiler {
    public DecompiledClassResult decompile(VirtualFile file, byte[] bytes) {
        // More complex decompilation process
        // Integrates with IntelliJ's VFS and project structure
    }
}

The intellij-community code showcases integration with IntelliJ's virtual file system and project structure, while jd-gui focuses solely on decompilation. intellij-community offers a more feature-rich environment but with added complexity, whereas jd-gui provides a simpler, more focused decompilation tool.

1,993

This is the public repository for the CFR Java decompiler

Pros of CFR

  • More actively maintained with frequent updates
  • Better handling of modern Java features (e.g., lambdas, switch expressions)
  • Command-line interface allows for easier integration into automated workflows

Cons of CFR

  • Lacks a graphical user interface, which may be less user-friendly for some users
  • May produce more verbose output in certain cases, potentially making the decompiled code harder to read

Code Comparison

JD-GUI output:

public class Example {
    public static void main(String[] args) {
        System.out.println("Hello, World!");
    }
}

CFR output:

public class Example {
    public static void main(String[] args) {
        System.out.println("Hello, World!");
    }
}

In this simple example, both decompilers produce identical output. However, differences may become more apparent with more complex code structures, especially those involving newer Java features.

CFR generally excels in accurately decompiling modern Java constructs, while JD-GUI provides a more user-friendly interface for quick code inspection. The choice between the two depends on specific use cases and personal preferences.

4,990

An Open Source Java Decompiler Gui for Procyon

Pros of Luyten

  • More actively maintained with frequent updates
  • Supports newer Java versions and language features
  • Offers a more modern and user-friendly interface

Cons of Luyten

  • May have slightly longer decompilation times for large files
  • Less established reputation compared to JD-GUI

Code Comparison

Luyten:

public class Main {
    public static void main(String[] args) {
        System.out.println("Hello, Luyten!");
    }
}

JD-GUI:

public class Main {
    public static void main(String[] args) {
        System.out.println("Hello, JD-GUI!");
    }
}

Both tools produce similar decompiled code output, with minor differences in formatting and variable naming conventions. The core functionality of decompiling Java bytecode remains consistent between the two projects.

Luyten and JD-GUI are both popular Java decompilers with their own strengths. Luyten offers more recent updates and support for newer Java features, while JD-GUI has a longer-standing reputation in the community. The choice between the two often comes down to personal preference and specific project requirements.

Unofficial mirror of FernFlower Java decompiler (All pulls should be submitted upstream)

Pros of fernflower

  • More actively maintained with frequent updates
  • Better handling of complex Java constructs and newer language features
  • Produces more readable and accurate decompiled code in many cases

Cons of fernflower

  • Command-line interface, lacking a graphical user interface
  • May require more setup and configuration for use
  • Can be slower for decompiling large projects compared to JD-GUI

Code comparison

fernflower:

public class Example {
    public static void main(String[] args) {
        System.out.println("Hello, World!");
    }
}

JD-GUI:

public class Example {
  public static void main(String[] paramArrayOfString) {
    System.out.println("Hello, World!");
  }
}

In this simple example, fernflower produces more idiomatic Java code by using String[] args instead of String[] paramArrayOfString for the main method parameter.

Both fernflower and JD-GUI are popular Java decompilers with their own strengths. fernflower excels in producing high-quality decompiled code and supporting modern Java features, while JD-GUI offers a user-friendly graphical interface. The choice between them often depends on the specific use case and user preferences.

6,287

smali/baksmali

Pros of smali

  • Focuses on disassembling and assembling Android's dex format
  • Provides a more low-level view of the code, useful for detailed analysis
  • Supports both disassembly and reassembly of dex files

Cons of smali

  • Steeper learning curve due to working with Dalvik bytecode
  • Limited to Android applications, unlike jd-gui's broader Java support
  • Requires additional steps to obtain human-readable code

Code Comparison

smali (disassembled Dalvik bytecode):

.method public onCreate(Landroid/os/Bundle;)V
    .locals 1
    .param p1, "savedInstanceState"    # Landroid/os/Bundle;

    .prologue
    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    const/high16 v0, 0x7f030000
    invoke-virtual {p0, v0}, Lcom/example/MainActivity;->setContentView(I)V

    return-void
.end method

jd-gui (decompiled Java):

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
}

The smali output provides a lower-level representation of the code, while jd-gui attempts to reconstruct the original Java source code, making it more readable for most developers but potentially losing some implementation details.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

JD-GUI

JD-GUI, a standalone graphical utility that displays Java sources from CLASS files.

Description

JD-GUI is a standalone graphical utility that displays Java source codes of ".class" files. You can browse the reconstructed source code with the JD-GUI for instant access to methods and fields.

How to build JD-GUI ?

> git clone https://github.com/java-decompiler/jd-gui.git
> cd jd-gui
> ./gradlew build 

generate :

  • "build/libs/jd-gui-x.y.z.jar"
  • "build/libs/jd-gui-x.y.z-min.jar"
  • "build/distributions/jd-gui-windows-x.y.z.zip"
  • "build/distributions/jd-gui-osx-x.y.z.tar"
  • "build/distributions/jd-gui-x.y.z.deb"
  • "build/distributions/jd-gui-x.y.z.rpm"

How to launch JD-GUI ?

  • Double-click on "jd-gui-x.y.z.jar"
  • Double-click on "jd-gui.exe" application from Windows
  • Double-click on "JD-GUI" application from Mac OSX
  • Execute "java -jar jd-gui-x.y.z.jar" or "java -classpath jd-gui-x.y.z.jar org.jd.gui.App"

How to use JD-GUI ?

  • Open a file with menu "File > Open File..."
  • Open recent files with menu "File > Recent Files"
  • Drag and drop files from your file explorer

How to extend JD-GUI ?

> ./gradlew idea 

generate Idea Intellij project

> ./gradlew eclipse

generate Eclipse project

> java -classpath jd-gui-x.y.z.jar;myextension1.jar;myextension2.jar org.jd.gui.App

launch JD-GUI with your extensions

How to uninstall JD-GUI ?

  • Java: Delete "jd-gui-x.y.z.jar" and "jd-gui.cfg".
  • Mac OSX: Drag and drop "JD-GUI" application into the trash.
  • Windows: Delete "jd-gui.exe" and "jd-gui.cfg".

License

Released under the GNU GPL v3.

Donations

Did JD-GUI help you to solve a critical situation? Do you use JD-Eclipse daily? What about making a donation?

paypal paypal