'\" t .\" @(#)javap.1 1.4 98/11/10 SMI; .\" Copyright 1999 Sun Microsystems, Inc. All rights reserved. .\" Copyright 1999 Sun Microsystems, Inc. Tous droits réservés. .\" '\"macro stdmacro .TH javap 1 "18 Feb 1999" .SH NAME javap \- Java class file disassembler .\" .\" This document was created by saving an HTML file as text .\" from the JavaSoft web site: .\" .\" http://java.sun.com/products/jdk/1.2/docs/tooldocs/tools.html .\" .\" and adding appropriate troff macros. Because the JavaSoft web site .\" man pages can change without notice, it may be helpful to diff .\" files to identify changes other than new functionality. .\" .SH SYNOPSIS .B javap [ .B \-b ] [ .BI \-bootclasspath " path" ] [ .B \-c ] .if n .ti +5n [ .BI \-classpath " path" ] [ .BI \-extdirs " dirs" ] [ .B \-help ] .ti +5n [ .BI \-J " flag" ] [ .B \-l ] [ .B \-package ] [ .B \-private ] .if n .ti +5n [ .B \-protected ] [ .B \-public ] [ .B \-s ] .if t .ti +5n [ .B \-verbose ] .if n .ti +5n .I class \. \. \. .SH DESCRIPTION .IX "Java class file disassembler" "" "Java class file disassembler \(em \fLjavap\fP" .IX "javap" "" "\fLjavap\fP \(em Java class file disassembler" .LP The .B javap command disassembles a Java\(tm class file. The options determine the output. If no options are used, .B javap displays the public fields and methods of the classes passed to it. The .B javap command displays its output to .BR stdout . For example, compile the following class declaration: .RS .nf \f3 import java.awt.*; import java.applet.*; public class DocFooter extends Applet { String date; String email; public void init() { resize(500,100); date = getParameter("LAST_UPDATED"); email = getParameter("EMAIL"); } public void paint(Graphics g) { g.drawString(date + " by ",100, 15); g.drawString(email,290,15); } } \f1 .fi .RE .LP The output from .B javap DocFooter yields: .RS \f3 .nf Compiled from DocFooter.java public class DocFooter extends java.applet.Applet { java.lang.String date; java.lang.String email; public void init(); public void paint(java.awt.Graphics); public DocFooter(); } \f1 .fi .RE .SH OPTIONS The following options are supported. .TP 15 .B \-b Ensures backward compatibility with .B javap in JDK 1.1. .TP 15 .BI \-bootclasspath path Specifies path from which to load bootstrap classes. By default, the bootstrap classes are the classes implementing the core Java platform located in .B jre/lib/rt.jar and .BR jre/lib/i18n.jar . .TP 15 .B \-c Prints out disassembled code, that is, the instructions that comprise the Java bytecodes, for each of the methods in the class. These are documented in the Java Virtual Machine Specification. .TP 15 .BI \-classpath path Specifies the .I path .B javap uses to look up classes. Overrides the default or the .SB CLASSPATH environment variable if it is set. Directories are separated by colons. Thus the general format for .I path is: .sp 1n .RS 20 .B .: .RE .sp 1n .RS 15 For example: .RE .sp 1n .RS 20 .B .:/home/avh/classes:/usr/local/java/classes .RE .sp 1n .TP 15 .BI \-extdirs dirs Overrides location at which installed extensions are searched. The default location for extensions is .BR jre/lib/ext . .TP 15 .B \-help Prints out help message for .BR javap . .TP 15 .BI \-J flag Passes .I flag directly to runtime system. .RS .LP .B example% javap -J-version .LP .B example% javap -JJ-Djava.security.manager \\ .br .B -Djava.security.policy=MyPolicy MyClassName .RE .TP 15 .B \-l Displays line and local variable tables. .TP 15 .B \-package Default; shows only package, protected, and public classes and members. .TP 15 .B \-private Shows all classes and members. .TP 15 .B \-protected Shows only protected and public classes and members. .TP 15 .B \-public Shows only public classes and members. .TP 15 .B \-s Displays internal type signatures. .TP 15 .B \-verbose Prints stack size, number of .IR locals , and .I args for methods. .SH ENVIRONMENT VARIABLES .TP 15 .SB CLASSPATH Used to provide the system with a path to user-defined classes. Directories are separated by colons. For example: .sp 1n .RS 20 .B .:/home/avh/classes:/usr/local/java/classes .RE .br .ne 11 .SH ATTRIBUTES See .BR attributes (5) for a description of the following attributes: .sp .TS box; cbp-1 | cbp-1 l | l . ATTRIBUTE TYPE ATTRIBUTE VALUE = Availability SUNWjvdev .TE .SH SEE ALSO .BR java (1), .BR javac (1), .BR javadoc (1), .BR javah (1), .BR jdb (1), .BR attributes (5)