javap.1 revision 0
1178N/A." CA 95054 USA or visit www.sun.com if you need additional information or
1178N/AThe \f3javap\fP command disassembles a class file. 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. For example, compile the following class declaration:
1178N/Aimport java.applet.*;
g.drawString(date + " by ",100, 15);
g.drawString(email,290,15);
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);
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);
1 invokespecial #1 <Method java.applet.Applet()>
16 putfield #5 <Field java.lang.String date>
26 putfield #7 <Field java.lang.String email>
Method void paint(java.awt.Graphics)
1 new #8 <Class java.lang.StringBuffer>
5 invokespecial #9 <Method java.lang.StringBuffer()>
9 getfield #5 <Field java.lang.String date>
20 invokevirtual #12 <Method java.lang.String toString()>
27 invokevirtual #13 <Method void drawString(java.lang.String, int, int)>
32 getfield #7 <Field java.lang.String email>
40 invokevirtual #13 <Method void drawString(java.lang.String, int, int)>
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. Directories are separated by colons. Thus the general format for \f2path\fP is:
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.