How to Use decompilation tools and plug-ins to view the java *. class file source code and decompilation. class

Source: Internet
Author: User

How to Use decompilation tools and plug-ins to view the java *. class file source code and decompilation. class

Java Decompiler [java decompilation]: A decompilation tool is developed to conveniently view the *. class file source code. The following describes how to view the source code: Tools & plug-ins


1. JD-GUI

JD-GUI is displaying the java source code *. class FileGraphical interface tool. DownLoad JD-GUI-DownLoad

After downloading the tool, open the tool and drag the jar package to the display window to view the source code.


Example: View jd-gui.exe package source code through xUtils-2.6.14.jar tools:





However, IDE (Integrated Development Environment) is generally used for Development, such as Eclipse and android studio. IDE is generally rich in Plug-ins to facilitate development efficiency. If IDE still uses a graphical interface tool to view the jar package instead of the plug-in, this is quite drunk. Because I didn't know how to use the plug-in before, it took a long time to get drunk !! No culture is terrible! Computation: in the future, we will "explore more, engage more, and increase the breadth of knowledge! More research, more details, and more depth of knowledge !" . The following describes how to install plug-ins in Eclipse and android studio and view the *. class file of the jar package.
2. JD-Eclipse

(1) download the JD-Eclipse plug-in. After the download, open Eclipse and choose: Help --> Install New Software... --> add -- archive... to perform the following operations:

After installation, restart Eclipse and check the code of the *. class file.

ADD and Archive...



 


Select the plug-in to install:



Click next, and then restart Eclipse.


The effect is as follows:


3. JD-IntelliJ

JD-Intellij is a plug-in of IntelliJ IDEA. After this plug-in is installed, You can conveniently view the source code of the jar package. Download JD-Intellij

Take android studio as an example: it can be installed offline or online.

(1) offline installation steps:

A、download jd-intellij-0.6.zip;
B. Android studio File-> Settings...-> Plugins --> install plugin from disk .. import the downloaded plug-in.
C. Restart android studio.



(2) Online Installation

Android studio File-> Settings...-> Plugins --> Browse repositores .. search for JD-Intellij



After restarting studio, view the source code of the class file of the jar package:




References:

1. Java DeCompiler

2. Download and description of the plug-in. There are many plug-ins in it. Please download them for trial.

3. Install the JD-Eclipse plug-in Eclipse

4. Several useful tools are recommended.

I have some shortcomings and I want to correct them!

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: info-contact@alibabacloud.com 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.