Eclipse install Java anti-compile plugin

Source: Internet
Author: User

Preface: In the actual development almost will use some framework to assist the project development work, for some framework code we always have some curious heart, want to find out, the source of course better, for some of the code in the jar package we need to use the Anti-compilation tool to look at, Here is a common way I used to install the Java Anti-compilation tool, the operation is relatively simple, but long time also easy to forget, or in this small write a pen! After all, good memory is better than bad writing (plug-in market has a lot of fun, they can try to play to see!) )

Version information for 1:eclipse

2:help--eclipse Marketplace

3-1: Enter decompiler to search for and install this plugin

3-2: Enter anti-compilation search and install this plugin (there are many fun plugins, try to play)

4: There are several different anti-compilation plug-in tools to choose from, you can first select, and then try to see the better play

5: No choice, do not accept, you can not continue to play

6: Of course we have to continue.

7: OK! The anti-compilation plugin is complete, and after you restart eclipse you can play, then yes!

8: Want to see the anti-compile plugin setup options after installation window--preferences

9: For the Eclipse Class decompiler Preferences page, you can select the default anti-compiler tool and perform the basic anti-compiler settings.

The default anti-compilation tool is more advanced for Jd-core,jd-core, which supports new syntax such as generics, enums, annotations, and so on JDK1.5.


The meaning of the preference configuration option is as follows:

9-1. Reusing Cache code : It is only recompiled once, and each time the class file is opened, the cached anti-compilation code is displayed.
9-2. ignore the source code that already exists : If unchecked, the class file is checked for Java source code, if it is bound, the Java source code is displayed, and if unbound, the class file is recompiled. If checked, the bundled Java source code is ignored and the results of the decompile are displayed.
9-3. display the anti-compiler report : Displays data reports and exception information generated by the anti-compiler after decompile.


9-4. using the Eclipse Code formatting tool : Using the Eclipse formatting tool to reformat the results of the disassembly, this operation consumes some time when the entire jar package is recompiled.
9-5. using the Eclipse member sort: Use Eclipse member sort to reformat the results of the disassembly and to decompile the entire jar package, this operation consumes a lot of time.


9-6. output The original line number information in an annotated manner : If the class file contains the original line number information, the line number information is printed as a comment to the anti-compilation result.
9-7. aligning code to facilitate debugging based on line number : If selected, the plugin uses the AST tool to parse the results of the disassembly and adjust the order of the code according to the line number information to facilitate single-step tracking debugging during the debug process.


9-8. set the class anti-compilation viewer as the default class file editor : By default, the class viewer is ignored, and each time eclipse is started, the class file is opened by default using the classes viewer provided by the plugin.

10: View the referenced class | | Interface | | method The following methods of the anti-compilation code

Method One: Right-click in the class | | Interface || method Name, select Open Declaration, you can enter the source code.

Method Two: Right-click in the class | | Interface || method Name, directly press the F3 key, you can enter the source code.

Method Three: Always hold down the CTRL key, and then click Class | | Interface || method Name, you can enter the source code. (I prefer this mode of operation)

11: Plug-in provides a system menu, toolbars, when the plug-in class is opened by the anti-compilation viewer, the menu and toolbar options are activated, you can easily configure the preferences, toggle the Anti-compilation tool to re-compile, and export the results of the anti-compilation.

12: Reference

Http://www.blogjava.net/cnfree/archive/2012/10/30/390457.html

Eclipse install Java anti-compile plugin

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: 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.