The Features of Eclipse Class Decompiler

Warning! This solution has been removed from Eclipse Marketplace and the Eclipse Foundation strongly suggests that users update to the new Enhanced Class Decompiler. Read the security bulletin.

Eclipse Class Decompiler is a plugin for the Eclipse platform. It integrates JD, Jad, FernFlower, CFR, and Procyon seamlessly with the Eclipse IDE. It displays all the Java sources during your debugging process, even if you do not have them all. And you can debug these class files directly without source code. It also integrates Javadoc and supports the syntax of JDK8 lambda expressions.

This project started in October 2012. When the Eclipse version was 3.x, I used the JadClipse plugin. But it didn’t support Eclipse 4.x, and the author didn't maintain it anymore. I decided to create a new decompiler plugin, and the initial version contained Jad and JD. The plugin now supports five decompilers and is based on the Eclipse JDT plugin. JDT provides a lot of features and has good scalability, so the decompiler plugin can be implemented easily. The following graph is the decompiler plugin architecture diagram:

default decompiler setting

Support Several Kinds of Decompiler

The first Java decompiler was Jad, and the initial release was before 1999, 18 years ago. Jad was so old that it didn’t support Java generic type. Then JD appeared, it supported Java 7, much better than Jad. FernFlower, CFR, and Procyon are new modern decompilers that support Java 8. The Eclipse Class Decompiler integrates all of them in one plugin. The decompilers I highly recommend are FernFlower and JD. FernFlower supports all Java versions, but JD is the fastest. You can set the default decompiler of your choice in the Eclipse preference section.

default

Support to Debug Code Without Source

If the class file contains debug attributes, you can debug it in the Eclipse Class Decompiler Viewer. There are two ways to debug a class file. The first way is to set the decompiler preference, and to realign the line number. The second way is to check the debug mode in the decompiler menu bar. When your Eclipse workspace is in debug perspective, the debug mode becomes the default. The decompiler plugin will ignore your debug mode choice.

debug menuitem

debug settings

Support JavaDoc and Java 8 Lambda Expression

The decompiler plugin implements the JavaDoc feature. If the jar binds javadoc in the Eclipse workspace, the api document will display on the decompiler viewer.

Jad and JD don't support Java 8. If you choose them as the default decompiler, when the class compliance level is Java 8, the decompiler plugin will decompile the code by FernFlower automatically.

FernFlower, CFR, and Procyon also support Java 8 Lambda expression. But the decompiled source codes of these decompilers are not the same, you can choose the one that works best for you.

lambda&javadoc

Support to Export Decompiled Source Code

This is a utility feature. You can export the decompiled codes from one or more classes, even the whole jar.

export

Support to DND and Decompile Class

The decompiler plugin can decompile the class file outside of the Eclipse IDE as well. Drag and drop the class file to the Eclipse editor area, the decompiled source code will display.

Preference Settings

The decompiler preference settings section is found here "Window > Preferences > Java > Decompiler". You can open the Eclipse perference dialog to set the preference for yourself. The most important setting is the "Default Class Decompiler", you may change it frequently.

Please also check the startup option and set the "Class Decompiler Viewer" as the default class viewer, otherwise the decompiler plugin is no longer effective.

Preferences

Install Eclipse Decompiler Plugin

You can download the plugin on the Eclipse Marketplace webpage or in your Eclipse installation:

  • Click on "Help > Eclipse Marketplace...",
  • Search "Eclipse Class Decompiler" in the Eclipse Marketplace dialog,
  • Find "Eclipse Class Decompiler" and click on button "install",
  • Check "Eclipse Class Decompiler",
  • Next, next, next... and restart.

Status & Roadmap

The plugin is stable now, but it still has several issues to be fixed. Meanwhile, if the Eclipse IDE upgrades or a new decompiler appears, I will also update this plugin.

Welcome to use the Eclipse Class Decompiler.