Java decompilation Tool Selection

Source: Internet
Author: User
========================================================== ======================================== The JAVA language was released by sun in May 1995, because of its high security, code optimization, and cross-platform features, it quickly replaces many traditional advanced languages and occupies the dominant position in enterprise-level network application development and many other fields. However, JAVA's most prominent cross-platform advantage makes it impossible to compile the code at the cost, but it must run in the form of intermediate code in the virtual machine environment, this makes JAVA decompilation easier to implement than other advanced languages, and the decompilation code is almost comparable to the source code after optimization. In order to better protect intellectual property rights and prevent the company's intellectual achievements from being easily stolen, developers need to have a deep understanding of the decompilation tool to take targeted protection measures. Currently, there are more than 30 popular JAVA decompilation tools, of which three are excellent: 1. JAD is widely used among many JAVA decompilation tools, several well-known tools use the same core engine-JAD, which mainly includes: front End Plus, mDeJava, Decafe Pro, Cavaj Java Decompiler, DJ Java Decompiler, NMI's Java Class Viewer, and domestic JAVA source code decompilation experts. JAD itself is a command line tool without a graphical interface. Most of the above tools Add a graphical interface based on the JAD kernel. The joint selection of these products proves the distinguished position of JAD in the field of JAVA decompilation. The JAD version I used to test is 1.5.8f. JAD is developed using Microsoft Visual C ++ and runs very fast. It can process complex JAVA compilation files. Many parameters enable JAD to cope with multiple encryption methods flexibly, making the decompiled code more optimized and easier to read. Because there are too many JAD parameters, there is no need to explain them one by one. Several of the most common ones are as follows:

-D: Specifies the directory of the output file.

-S -The output file extension (. jad by default) is usually specified as. java to facilitate modification and re-compilation. -8-convert Unicode characters to ANSI strings. If the output string is Chinese, you must add this parameter to display it correctly. The most common decompilation commands are as follows: Jad-d c:/javasource-s. java-8 javatest. the class command returns the javatest in the current directory. the class is decompiled into javatest. java is stored in the c:/javasource directory, and the prompt output is Chinese, rather than Unicode code. 2. The open source code JODEJODE is a member of Sourceforge.net, the world's largest open source project website. Do not underestimate it when the source code is open. Among all JAVA anti-compilers, the Decompilation Effect of JODE is the best, especially for some common encryption methods, such as obfuscation technology. JODE is also developed in pure JAVA. Recently, more and more JAVA decompilation software also chooses JODE as their core engine, such as JCavaj Java Decompiler and BTJ (Back To Java) and jEdit's JavaInsight plugin. JODE is a runable JAR file, which can be run by double-clicking in windows. Note that JODE does not load the class File compiled by JAVA in the conventional Open-> File mode (*. class) or class package (*. jar), but through the Set Classpath In the Options menu. A separate class file can use its upper-level directory as the Classpath input, and then select Reload Classpath. The new class package or class name will appear in the left-side window. Double-click the class package name to expand the directory tree structure, double-click the class name to be decompiled. The decompiled source code is displayed in the window in the upper right corner. 3. The unique DAVADAVA is not an independent JAVA anti-compiler, but part of the JAVA code optimization tool Soot. Like JODE, Soot is developed in JAVA only and is also an independent JAR package, but it cannot be directly run by double-clicking, but is running in the command line status like JAD. Soot has strict Configuration Requirements on environment variables. Generally, you need to Set CLASSPATH as follows: Set CLASSPATH = % CLASSPATH %; c:/sootdir/sootclasses-2.1.0.jar ;.; c:/sootdir/is the path of the downloaded soot class package, which is at the end of CLASSPATH .; indicates the current directory. If this is not added, Soot will often report a class error that cannot be found. DAVA is used as a Soot parameter. Its common usage is as follows: Java soot. main-f dava-d c:/javasource javatest note that the last class name does not need to be included. class suffix, because it processes class files by default, this operation is the same as the preceding JAD parameter. DAVA adopts the Process Optimization Method for decompilation, which is different from the traditional method of decompilation, but has a unique decompilation effect on the encryption method that changes the process class. The three tools have their own advantages, but the results are very good. After testing, they can basically decompile some of the built-in JDK routines, and then re-compile without any modifications, and can run normally! (All the tools in this article have been tested by myself. jdk 1.4.2 _ 03 was used at that time. It has been more than a year since I wrote the article, and jdk has been released to 1.5, even some programs are not very good at anti-encoding)

From: http://home.donews.com/donews/article/9/93121.html

After reading this document, I compared it and decided to select jode. I thought the interface was simple and clean, and it was relatively small. I didn't need to install it. I only needed a jar file and found that there was also an Eclipse plug-in.

 

Jode decompilation expert Jode is a very prominent decompilation expert, especially when used together with Eclipse. The following describes the installation method:

Help => Software Updates => Find and install... => search for new features to install, click "new remote site... "Enter the http://www.technoetic.com/eclipse/update in the URL bar and next, you will see" jode decompiler plugin *. * ", you can install it on the right. Because jode decompiler is written in pure Java, no other components are required to support it, after installation, You can see window => preferences... => JAVA => jode decompiler tab. After installation, set the file association. Window => preferences... => General => editors => File Associations find "*. class "in" associated editors ", you can see" jode class File Viewer ". Select it and click the default button.

Now you can use jode to view the source code of the. Class file in the jar package.

Of course, you must first ensure that all the packages referenced in the. Class file you open are in the project !!! From: http://www.blogjava.net/hengheng123456789/articles/100939.html

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.