javap.1 revision 2362
2362N/A." or visit www.oracle.com if you need additional information or have any
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.*;
1178N/A g.drawString(date + " by ",100, 15);
0N/A g.drawString(email,290,15);
1178N/ACompiled from DocFooter.java
1178N/Apublic class DocFooter extends java.applet.Applet {
1178N/A java.lang.String date;
1178N/A java.lang.String email;
1178N/A public void paint(java.awt.Graphics);
1178N/ACompiled from DocFooter.java
1178N/Apublic class DocFooter extends java.applet.Applet {
1178N/A java.lang.String date;
1178N/A java.lang.String email;
1178N/A public void paint(java.awt.Graphics);
1178N/A 1 invokespecial #1 <Method java.applet.Applet()>
1178N/A 16 putfield #5 <Field java.lang.String date>
1178N/A 26 putfield #7 <Field java.lang.String email>
1178N/AMethod void paint(java.awt.Graphics)
1178N/A 1 new #8 <Class java.lang.StringBuffer>
1178N/A 5 invokespecial #9 <Method java.lang.StringBuffer()>
1178N/A 9 getfield #5 <Field java.lang.String date>
1178N/A 20 invokevirtual #12 <Method java.lang.String toString()>
1178N/A 27 invokevirtual #13 <Method void drawString(java.lang.String, int, int)>
1178N/A 32 getfield #7 <Field java.lang.String email>
1178N/A 40 invokevirtual #13 <Method void drawString(java.lang.String, int, int)>
1178N/APrints 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
1178N/ASpecifies 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:
1178N/ASpecifies 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.
1178N/AOverrides location at which installed extensions are searched for. The default location for extensions is the value of \f2java.ext.dirs\fP.