Name

javap — The Java Class Disassembler

Synopsis

javap [ options ] classnames
               

Description

javap reads the class files specified by the class names on the command line and prints a human-readable version of the API defined by those classes. javap can also disassemble the specified classes, displaying the Java VM byte codes for the methods they contain.

Options

-b

Enables backward compatibility with the output of the Java 1.1 version of javap. This option exists for programs that depend on the precise output format of javap. Java 1.2 and later.

-bootclasspath path

Specifies the search path for the system classes. See javac for information about this rarely used option. Java 1.2 and later.

-c

Displays the code (i.e., Java VM byte codes) for each method of each specified class. This option always disassembles all methods, regardless of their visibility level.

-classpath path

Specifies the path javap uses to look up the classes named on the command line. This option overrides the path specified by the CLASSPATH environment variable. Prior to Java 1.2, this argument specifies the path for all system classes, extensions, and application classes. In Java 1.2 and later, it specifies only the application classpath. See also -bootclasspath and -extdirs. See java and javac for more information on the classpath.

-extdirs dirs

Specifies one or more directories that should be searched for extension classes. See javac for information about this rarely used option. Java 1.2 and later.

-J

Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.