'\" t .\" @(#)javap.1 1.4 98/04/20 SMI; .\" Copyright (c) 1996 Sun Microsystems, Inc. .\" All Rights Reserved. '\"macro stdmacro .TH javap 1 "6 June 1997" .SH NAME javap \- Java class file disassembler .\" .\" This document was created by saving an HTML file as text .\" from the JavaSoft web site: .\" .\" http://www.javasoft.com:80/products/jdk/1.1/docs/tooldocs/solaris/index.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 ] [ .B \-c ] [ .BI \-classpath path ] [ .B \-h ] [ .BI \-J " flag" ] .if n .ti +5n [ .B \-l ] [ .B \-package ] [ .B \-private ] .if t .ti +5n [ .B \-protected ] .if n .ti +5n [ .B \-public ] [ .B \-s ] [ .B \-verbose ] [ .B \-verify ] .if n .ti +5n [ .B \-version ] .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 .B \-c Prints out disassembled code, that is, the instructions that comprise the Java bytecodes, for each of the methods in the class. .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 .B \-h Generates code that can be placed to a C header file. .TP 15 .BI \-J " flag" Passes .I flag directly to runtime system. .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. .TP 15 .B \-verify Runs the verifier. .TP 15 .B \-version Prints out the .B javap version string. .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 .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)