Now that the Java language is wildly popular around the world, it is widely used in the production of Internet databases, multimedia, CGI, and Dynamic Web pages. Demand for Java programmers in the United States exceeded c++! for the first time in 1999
Because of the recent analysis of some Java programs, the compiler of the Java has a bit of understanding, the following I understand the situation described below, I hope to help Java enthusiasts.
Java is a program structure called "Byte Encoding", which is divided into small programs (embedded in HTML files) and applications (executed directly in the command state) of two types. Regardless of the structure, once compiled with the Javac command, it becomes an executable with the same name as the suffix class. This file is not readable code.
After reviewing the Sun's JDK (JDK1.1.3) documentation, I found a javap file (EXE) that was supposedly decompile Java, located under \jdk\bin\, and was disappointed after being used by the instructions, which turned out to be a "decompile" You can only decompile the data area (definition) of a Java program, references to several methods, and classes, and so on.
Here I use a simple example to illustrate the problem.
Java source program Hello_java.java is as follows:
Import java.applet.*;
Import java.awt.*;
public class Hello_java extends Applet
{
public void Paint (Graphics g)
{
g.DrawString ("Hello java!\n", 20,20);
}
}
Anti-compile command: javap-c-package-public-private Hello_java Hello.java
The resulting decompile results (Hello.java) are as follows: (see the instructions for selecting the JAVAP command, here-C indicates that the decompile was selected)
Compiled from Hello_java.java
Public synchronized class Hello_java extends Java.applet.Applet
/* Acc_super bit set */
{
public void paint (java.awt.Graphics);
public Hello_java ();