Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.nbauma109:jd-gui-duo:2.0.109'
}
dependencies {
implementation("com.github.nbauma109:jd-gui-duo:2.0.109")
}
<dependency>
<groupId>com.github.nbauma109</groupId>
<artifactId>jd-gui-duo</artifactId>
<version>2.0.109</version>
</dependency>
libraryDependencies += "com.github.nbauma109" % "jd-gui-duo" % "2.0.109"
:dependencies [[com.github.nbauma109/jd-gui-duo "2.0.109"]]
Downloads from Github releases :
Downloads from Jitpack :
Downloads from Sourceforge :
<a href="https://sourceforge.net/projects/jd-gui-duo/"> <img src="https://sourceforge.net/cdn/syndication/badge_img/3961310/oss-rising-star-white" alt="SourceForge OSS Rising Star Award" width="110"> </a>Looking for an Eclipse plugin ? Try ECD++
A 2-in-1 JAVA decompiler based on JD-CORE v0 and v1.
Initially a duo of decompilers were supported (JD-Core v0 & v1), but now other decompilers are supported with the transformer-api project. JD-Core v0 and v1 are 2 different decompilers rather than 2 different versions of the same one. They use a different algorithm :
This project is built on top of original JD-GUI written by Emmanuel Dupuy.
The binaries are built and hosted at jitpack.io (identifiable with rocket logo) and the download buttons below retrieve the distributions directly from Jitpack servers :
<a href="https://jitpack.io/com/github/nbauma109/jd-gui-duo/jd-gui-duo/2.0.109/jd-gui-duo-2.0.109-windows.tar.xz?" target="_blank"> <img src="assets/badges/jitpack-download-windows.svg" width="200" height="56" alt="Download Windows archive"> </a> <br> <a href="https://jitpack.io/com/github/nbauma109/jd-gui-duo/jd-gui-duo/2.0.109/jd-gui-duo-2.0.109-linux.tar.xz?" target="_blank"> <img src="assets/badges/jitpack-download-linux.svg" width="200" height="56" alt="Download Linux archive"> </a> <br> <a href="https://jitpack.io/com/github/nbauma109/jd-gui-duo/jd-gui-duo/2.0.109/jd-gui-duo-2.0.109-macos.tar.xz?" target="_blank"> <img src="assets/badges/jitpack-download-macos.svg" width="200" height="56" alt="Download macOS archive"> </a>APKDEXAARCLASSEARJARJAVAJMODKARWARZIPAfter opening a jar, APK or similar archive, click 'Open Type' to decompile a class (tip: use $ to match the end of the class name)

Open Type Hierarchy builds a supertype and subtype tree from the indexes of the currently opened containers. It is useful when a class is spread across several archives or when you want to inspect inheritance without leaving the decompiled view, and if several matching locations exist the location picker lets you choose the target container before opening it.
Use the outline tree to select decompiled methods :

In the Help -> Preferences menu, use search source code on Maven Central if you want to show the original source code, if it's available :


It is possible to do a maven central search behind a proxy or with a private Nexus repository.
Configure settings in Help -> Secured preferences.


These preferences are protected by a master password that you choose after saving and which will be requested each time you re-open this panel.
You can do a maven search, with or without such settings, depending on when you need them or not :


Use the search button to do a search for methods, string constants,...

The search dialog is index-based and can do more than a plain text lookup. It can search for type, constructor, method, field, string constant and Java module declarations or references, supports * and ? wildcards, and reopens matching entries with highlight information so the relevant occurrences stay marked in the target source view.
Use File -> Save All Sources to decompile all sources into a sources jar (choose a destination directory where you have rights)



The Help menu also exposes a dedicated Key Bindings dialog. It lets you remap shortcuts for file actions, navigation, search, outline, line navigation and other commands, restore the defaults when needed, and apply the new bindings across the main window and the incremental find UI without editing configuration files by hand.
Right-click on a method of the outline tree and select 'Show Byte Code' in the context menu.


To get a visual of the control flow graph that is used by JD-Core v1 for each of the decompilation steps, select one of the menus 'Show Control Flow Graph ...'. The graph is built by plantuml.


Sometimes JD-Core v1 fails to decompile a method. In this case, method will be patched from JD-Core v0 if possible and the comment 'Patched from JD-Core v0' will appear :

A modified version of JarComp is used to compare the jars and netbeans diff module for class comparison (see https://github.com/nbauma109/netbeans-visual-diff-standalone).

Select the 2 files to compare or drag and drop files into the inputs :

The differences in size and CRC checksums are shown :

Double-click on the row you want to compare :

Or alternatively, if the 2 jars are opened, you can open the type you want to compare :

If you select no, you will be asked select which file you want to open

Besides file-level comparison, the File menu can compare JD-Core V0 and JD-Core V1 for the currently opened class. This opens a side-by-side diff for the two built-in engines, which is useful when investigating decompilation regressions, understanding algorithmic differences between both cores or checking why method patching was necessary.
When you drag and drop three or more libraries, JD-GUI-DUO can generate a Maven/Gradle build skeleton instead of only opening them. The generator resolves SHA-1 values against Maven Central when possible, falls back to filenames and manifest metadata when it cannot, and opens a generated archive containing pom.xml, build.gradle and mvn_deploy.bat.
The navigable links are shown as underlined portions of text. Single click navigates to definition (no CTRL click, no double click).
The contextual actions also let you copy either the qualified Java name or the JVM internal name of the current type, field or method. This is useful when moving between decompiled source, stack traces, bytecode tools and APIs that expect slash-separated internal names.
Edit -> Paste Log turns the clipboard contents into an in-memory .log page. Java stack trace frames are parsed into hyperlinks, so clicking a frame can open the matching decompiled type directly or jump to the reported line number when that information is available in the log.
Choose another decompiler in the preferences window and the class will be decompiled with the newly selected decompiler as soon as you press OK.


Click Configure button to choose decompiler settings (each decompiler has a different panel of its own) :

Compiler reports errors and warnings. Choose whether you want to report them in the Eclipse preferences page.



When this option is selected, the jars located in the same directory and the jmods (or rt.jar) of JAVA_HOME will be used by decompilers for better type resolution. Currently, the decompilers supporting this are CFR, JD-Core v1, Procyon. For optimal results, setup your JAVA_HOME to the same JDK that was used to build the jar you want to decompile (if any doubt, check the META-INF/MANIFEST.MF inside the jar). The running JRE of jd-gui-duo does not interfere. This option does not support jars in war.
This option applies to the Eclipse AST parser, which is used in various contexts to provide :
By default, it uses the running VM of jd-gui-duo, but you can choose another JRE system library by unticking "Include running VM boot classpath". You can also choose a compatible Source and Compliance.

This is a known option from the original JD-GUI that enables to align code for debugging if the debugging information is present in the class files. As of now, this is only supported by JD-Core v0 and v1. If the code is misaligned, the numbers will appear in red.


This option uses the same feature as Eclipse to cleanup unnecessary casts.

Quick outline (CTRL+SHIFT+O) is a feature which was present in the C++ versions 0.3.x of jd-gui and is now present in jd-gui-duo. It now includes "filter as you type" feature.


When JD-GUI-DUO starts without explicit input files, it can reopen the files remembered from the previous session.
On non-macOS platforms, there is also a single-instance preference for the main window. When enabled, opening files in a second launch forwards them to the already running window instead of creating another application instance.
Decompiler|Author|Link|License --- | --- | --- | --- CFR|Lee Benfield|https://github.com/leibnitz27/cfr|MIT Procyon|Mike Strobel|https://github.com/mstrobel/procyon|Apache v2 Fernflower|Jetbrains|https://github.com/JetBrains/intellij-community/tree/master/plugins/java-decompiler/engine|Apache v2 Vineflower|Vineflower|https://github.com/Vineflower/vineflower|Apache v2 JADX|Skylot|https://github.com/skylot/jadx|Apache v2 JD-GUI|Emmanuel Dupuy|https://github.com/java-decompiler/jd-gui|GPL v3