jdk.jdeps/com.sun.tools.javap.Main - "javap" Command


How to run "javap" command from JDK lib\modules JImage file?

✍: FYIcenter


"javap" command allows you to run the Java Debugger interactively.

"javap" command is supported by the jmods\jdk.jdeps.jmod module file, which is also linked into the lib\modules JImage file.

You can run the "javap" command using the lib\modules JImage file as described below:

fyicenter> %JDK_HOME%\bin\java --module jdk.jdeps/com.sun.tools.javap.Main

Usage: javap <options> <classes>
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 <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:


jdk.jdeps/com.sun.tools.jdeprscan.Main - "jdeprscan" Command

jdk.jconsole/sun.tools.jconsole.JConsole - "jconsole" Command

Tools Supported from JDK 9+ lib\modules JImage

⇑⇑ FAQ for JDK (Java Development Kit)

2019-09-04, 1506🔥, 0💬