Forrest logo
back to the javap tool

javap:tldr:4ede1

javap: Disassemble and list a `.class` file.
$ javap ${filename-class}
try on your machine

The command javap is a tool provided by the Java Development Kit (JDK) that prints the public API (Application Programming Interface) of a compiled Java class. It is used to display the details of a compiled class such as its package, access modifiers, fields, methods, and other information.

In the command javap ${filename-class}, ${filename-class} should be replaced with the name of the compiled Java class file (without the extension .class). The command should be executed in the command-line interface (CLI) or terminal, with the appropriate Java development environment set up.

When the command is executed, it will display the public API details of the specified class. This information can help developers understand the structure and functionality of the class, and how to interact with it from other parts of the code.

For example, if you have a compiled class file called MyClass.class, running javap MyClass will print the public API details of the MyClass class.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the javap tool