Java decompilation plug-in: Eclipse class decompiler

Source: Internet
Author: User

In my spare time, I wrote a Java decompilation plug-in under Eclipse: Eclipse class decompiler, which integrates the two best Java decompilation tools Jad and JD-core, it is also seamlessly integrated with eclipse class viewer, allowing you to conveniently use this plug-in to view the source code of the class library, and debug Debugging Using this plug-in.

Eclipse class decompiler plug-in Update site:

Offline Installation Package 1:

Offline Installation Package II:

This plug-in only supports windows, Linux, and MacOSX operating systems.

Directly use eclipse for updates. It supports eclipse 3.xand 4.x. you can directly check the update plug-in without relying on any other plug-ins.

For eclipse class decompilerOn the preference page, you can select the default anti-compiler tool and perform basic anti-compiler settings.The default decompilation tool is JD-core, and JD-core is more advanced. It supports New syntaxes only after generic, Enum, annotation, and other jdk1.5.

Preference configuration options:

1. Reuse CacheCode: Only decompilation is performed once. The decompilation code cached is displayed each time this type of file is opened.

2. ignore existingSource code: If not selected, check whether the class file is bound to the Java source code. If bound, the Java source code is displayed. If not bound, decompile the class file. If this option is selected, the bound Java source code is ignored and The Decompilation result is displayed.

3. Show the decompilation Report: displays the data report and exception information generated after decompilation.

4. Use the eclipse code formatting tool: Use the eclipse formatting tool to re-format The Decompilation result. This operation takes some time to decompile the entire jar package.

5. sort by ECLIPSE members: Use eclipse member sorting to re-format The Decompilation results. This operation consumes a lot of time when the entire jar package is decompiled.

6. output the original line number information in the form of annotation: if the class file contains the original line number information, the line number information is printed to The Decompilation result in the form of annotation.

7. align the source code with the line number for debugging: If this item is selected, the plug-in uses the ast tool to analyze the decompilation results and adjust the code sequence based on the line number information to facilitate single-step debugging tracking during the debug process.

8. set the class decompilation viewer as the default class file editor. If this option is selected by default, the built-in class viewer of eclipse is ignored. After eclipse is started, the class viewer provided by this plug-in is used by default to open the class file.

The plug-in provides the system menu and toolbar. When the class decompilation viewer provided by the plug-in is opened, the menu and toolbar options are activated to conveniently configure the preferences and switch to the decompilation tool to re-compile, and export the decompilation results.


The context menu of the class decompilation viewer contains all the options of the context menu of the eclipse built-in class viewer, and adds a menu item "Export decompilation source code.

Open the class file in the project path. If you set the class decompilation viewer as the default viewer, double-click the class file. If it is not set as the default viewer, you can right-click it to view it.

The eclipse class decompiler plug-in also provides decompilation of the entire jar file or Java package. This operation supports package explorer to display the layout of packages. For tile layout, the exported Source Code does not contain sub-packages. For hierarchical layout, export the Selected Package and all its sub-packages.

Debug debugging: You can select an alignment line number in the preference to perform one-step tracing debugging. This is consistent with debugging operations when the common source code is included. You can also set breakpoints for tracking.



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.