Understanding javap tool

The javap command disassembles a class file. The javap command displays information about the fields,constructors and methods present in a class file.

Syntax to use javap tool

Let's see how to use javap tool or command.

Example to use javap tool

Output:

Another example to use javap tool for your class

Let's use the javap command for our java file.

Now let's use the javap tool to disassemble the class file.

Output:

javap -c command

You can use the javap -c command to see disassembled code. The code that reflects the java bytecode.

Output:

Options of javap tool

The important options of javap tool are as follows.

Option Description
-help prints the help message.
-l prints line number and local variable
-c disassembles the code
-s prints internal type signature
-sysinfo shows system info (path, size, date, MD5 hash)
-constants shows static final constants
-version shows version information


Contact US

Email:[email protected]

javap tool
10/30