Java program Decompilation

Source: Internet
Author: User

 

How can I decompile a Java Class file into a Java file. To be clear, it is really difficult to look at the source code. But it is not without solution.

We know that a Java program is suitable for use on various operating platforms. In fact, its working principle is interpreted. For example, every machine has a browser, after compiling the Class file of the program, this file is equivalent to an HTML file, which can be viewed on each machine. However, if the Windows 2000/system uses IE, while the UNIX Netscape and LINUX use another browser, these machines can see the HTML file I wrote, although the interfaces are not identical during browsing, they look similar to their respective systems. They read This HTML file in an interpreted manner. The displayed value is as much as the read value. Class files are such files. It has different storage formats in each system. It is related to their systems, but every system knows it. Because no system has JDK interpreter equivalent to a browser. For example, executable programs, which are common exe files, are directly binary code, which is related to the underlying machine, therefore, different operating systems cannot mix exe files. Therefore, in Win9X/2000, the Class is not directly stored in binary format. It is an interpreted type between a text file and a binary file.

Since a Java program is such a program, but now it has no encryption function, it is very easy to decompile. The Decompilation of the executable file exe can only be decompiled into a document in the Assembly format. However, the Class file can be decompiled into a Java file, allowing you to directly see the original code. I don't know how JDK works, but it compiles almost everything, such as the Code and JDK version, into the CLASS during compilation, which is beyond my expectation.

It's time to answer a netizen's question. It's easy to decompile the class file into a java file. Just download a decompilation software from the Internet. The use of these software is very simple. You don't have to learn it. Generally, software download can be obtained from websites. In addition, there are more than one software in this aspect. I have used such a decompilation software. This decompilation software is very powerful. I have done some experiments and used several examples, it decompiled the source code, including both the Application and Java Applet files, and the descriptions between the source code are decompiled, the decompiled source code file is almost identical to the source code file of the Java program I wrote, and the result is very good. I just don't know how powerful it is to decompile large programs, but I haven't tried it. If the software to be decompiled is not large, there is absolutely no problem. I just ask all netizens to forgive me. I can't talk about it without a lawsuit. Please search for it by yourself. These decompilers are made in foreign countries and are not available in China, but can be downloaded from many domestic sites.

I really hope Sun can come up with a solution in this regard. Otherwise, security is hard to address. For free software, this is very good, but for a company, it may be a bit bad. Who wants their software to let others see the source code?

 

 

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.