LinuxCommandLibrary

javap

Disassemble one or more class files and list them.

TLDR

Disassemble and list a .class file

$ javap [path/to/file.class]
copy


Disassemble and list multiple .class files
$ javap [path/to/file1.class path/to/file2.class ...]
copy


Disassemble and list a built-in class file
$ javap java.[package].[class]
copy


Display help
$ javap -help
copy


Display version
$ javap -version
copy

Help

Usage: javap   
where possible options include:
  -? -h --help -help               Print this help 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 -m    Specify module containing classes to be disassembled 
  --module-path              Specify where to find application modules 
  --system                    Specify where to find system modules 
  --class-path               Specify where to find user class files 
  -classpath                 Specify where to find user class files 
  -cp                        Specify where to find user class files 
  -bootclasspath             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:
   path/to/MyClass.class 
   jar:file:///path/to/MyJar.jar!/mypkg/MyClass.class 
   java.lang.Object 

Copied to clipboard