Skip to main content
deleted 22 characters in body
Source Link
Andy Guibert
  • 42.5k
  • 8
  • 43
  • 64

If you have a class file at build/com/foo/Hello.class, you can check what java version it is compiled at using the command:

javap -v build/com/foo/Hello.<path to class file> | grep "major"

Example usage:

$ javap -v build/classes/java/main/org/aguibertcom/libertyexample/Book.class | grep major
   
major version: 57

According to the table in the OP, major version 57 means the class file was compiled to JDK 13 bytecode level

If you have a class file at build/com/foo/Hello.class, you can check what java version it is compiled at using the command:

javap -v build/com/foo/Hello.class | grep "major"

Example usage:

$ javap -v build/classes/java/main/org/aguibert/liberty/Book.class | grep major
  major version: 57

According to the table in the OP, major version 57 means the class file was compiled to JDK 13 bytecode level

If you have a class file at build/com/foo/Hello.class, you can check what java version it is compiled at using the command:

javap -v <path to class file> | grep "major"

Example usage:

$ javap -v build/classes/com/example/Book.class | grep major
   
major version: 57

According to the table in the OP, major version 57 means the class file was compiled to JDK 13 bytecode level

Source Link
Andy Guibert
  • 42.5k
  • 8
  • 43
  • 64

If you have a class file at build/com/foo/Hello.class, you can check what java version it is compiled at using the command:

javap -v build/com/foo/Hello.class | grep "major"

Example usage:

$ javap -v build/classes/java/main/org/aguibert/liberty/Book.class | grep major
  major version: 57

According to the table in the OP, major version 57 means the class file was compiled to JDK 13 bytecode level