javap

The JDK tool that prints what a class file contains, including its bytecode with -c and its class file version with -v.

In more detail

javap turns the binary class file back into readable text, so you can check what the compiler really produced. In the course it shows the constructor the compiler wrote for you and the major version number, such as 65 for Java 21. It does not reproduce source code.

Examples

javap -c Hello | head -8
javap -v Hello | grep major

Related terms

Taught in

References