javap - Java Disassembler Command and Options

This section describes what are the commonly used command line options for the Java bytecode class disassembler - 'javap' tool.

What Is "javap"? "javap" is a command line tool that reads Java bytecode class files and disassembles them.

"javap" has been included in JDK installation since JDK 1.0. And it is represented by the %java_home%\bin\javap.exe program file.

"javap" command has the following syntax:

javap [options] classnames

where "options" is a list of options and "classnames" is a list of Java class names.

If you have %java_home%\bin directory included in "path" the environment variable, you can run "javap -help" to see the complete list of all options:

C:\herong>javap -help

Usage: javap <options> <classes>
where possible options include:
  -help  --help  -?    Print this usage message
  -version             Version information
  -v  -verbose         Print additional information
  -l                   Print line number and local variable tables
  -public              Show only public classes and members
  -protected           Show protected/public classes and members
  -package             Show package/protected/public classes
                       and members (default)
  -p  -private         Show all classes and members
  -c                   Disassemble the code
  -s                   Print internal type signatures
  -sysinfo             Show system info (path, size, date, MD5 hash)
                       of class being processed
  -constants           Show final constants
  --module <module>, -m <module>   
     Specify module containing classes to be disassembled
  --module-path <path> Specify where to find application modules
  --system <jdk>       Specify where to find system modules
  --class-path <path>  Specify where to find user class files
  -classpath <path>    Specify where to find user class files
  -cp <path>           Specify where to find user class files
  -bootclasspath <path>
     Override location of bootstrap class files

GNU-style options may use = instead of whitespace to separate the name of 
an option from its value. 

Each class to be shown may be specified by a filename, a URL, or by its 
fully qualified class name. Examples: 

For more information, see "javap" reference page at

Last update: 2018.

Table of Contents

 About This Book

 Java Tools Terminology

 Java Tools Included in JDK

 javac - The Java Program Compiler

 jar - The JAR File Tool

 jlink - The JRE Linker

 jmod - The JMOD File Tool

 jimage - The JIMAGE File Tool

 java - The Java Program Launcher

 jdb - The Java Debugger

 jcmd - The JVM Diagnostic Tool

 jconsole - Java Monitoring and Management Console

 jstat - JVM Statistics Monitoring Tool

 JVM Troubleshooting Tools

 jvisualvm (Java VisualVM) - JVM Visual Tool

 jmc - Java Mission Control

javap - The Java Class File Disassembler

javap - Java Disassembler Command and Options

 javap - Listing Public Variables and Methods

 "javap -private" - Listing Private Variables and Methods

 "javap -c -private" - Disassembling Java Bytecode Class

 Looking Up Method Signature with javap Command

 keytool - Public Key Certificate Tool

 jarsigner - JAR File Signer

 jshell - Java Language Shell

 native2ascii - Native-to-ASCII Encoding Converter

 Outdated Tutorials


 Full Version in PDF/EPUB