Javatpoint Logo
Javatpoint Logo

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.

OptionDescription
-helpprints the help message.
-lprints line number and local variable
-cdisassembles the code
-sprints internal type signature
-sysinfoshows system info (path, size, date, MD5 hash)
-constantsshows static final constants
-versionshows version information


Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA