javap.1 revision 4176
0N/A." or visit www.oracle.com if you need additional information or have any
The \f3javap\fP command disassembles one or more class files. Its output depends on the options used. If no options are used, \f3javap\fP prints out the package, protected, and public fields and methods of the classes passed to it. \f3javap\fP prints its output to stdout.
List of one or more classes (separated by spaces) to be processed for annotations (such as \f2DocFooter.class\fP). You may specify a class that can be found in the class path, by its file name (for example, \f2/home/user/myproject/src/DocFooter.class\fP), or with a URL (for example, \f2file:///home/user/myproject/src/DocFooter.class\fP).
import java.awt.*;
import java.applet.*;
g.drawString(date + " by ",100, 15);
g.drawString(email,290,15);
The output from \f3javap DocFooter.class\fP yields:
Compiled from "DocFooter.java"
public class DocFooter extends java.applet.Applet {
java.lang.String date;
java.lang.String email;
public void paint(java.awt.Graphics);
The output from \f3javap \-c DocFooter.class\fP yields:
Compiled from "DocFooter.java"
public class DocFooter extends java.applet.Applet {
java.lang.String date;
java.lang.String email;
1: invokespecial #1 // Method java/applet/Applet."<init>":()V
16: putfield #5 // Field date:Ljava/lang/String;
26: putfield #7 // Field email:Ljava/lang/String;
public void paint(java.awt.Graphics);
1: new #8 // class java/lang/StringBuilder
5: invokespecial #9 // Method java/lang/StringBuilder."<init>":()V
9: getfield #5 // Field date:Ljava/lang/String;
12: invokevirtual #10 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
17: invokevirtual #10 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
32: getfield #7 // Field email:Ljava/lang/String;
Prints out disassembled code, i.e., the instructions that comprise the Java bytecodes, for each of the methods in the class. These are documented in the
Specifies the path \f3javap\fP uses to look up classes. Overrides the default or the CLASSPATH environment variable if it is set.
Specifies path from which to load bootstrap classes. By default, the bootstrap classes are the classes implementing the core Java platform located in \f2jre/lib/rt.jar\fP and several other jar files.
Overrides location at which installed extensions are searched for. The default location for extensions is the value of \f2java.ext.dirs\fP.