javap.1 revision 2362
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung." Copyright 2002-2006 Sun Microsystems, Inc. All Rights Reserved.
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung." This code is free software; you can redistribute it and/or modify it
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung." under the terms of the GNU General Public License version 2 only, as
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung." published by the Free Software Foundation.
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung." This code is distributed in the hope that it will be useful, but WITHOUT
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung." version 2 for more details (a copy is included in the LICENSE file that
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung." accompanied this code).
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung." You should have received a copy of the GNU General Public License version
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung." 2 along with this work; if not, write to the Free Software Foundation,
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung." or visit www.oracle.com if you need additional information or have any
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung.TH javap 1 "04 May 2009"
49517467facf869d14d1e52e70cfa2199856fcf4Mario Amelung." Generated from HTML by html2man (author: Eric Armstrong)
The \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:
import java.awt.*;
import 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.