Main Tutorials

List of Java class file major version numbers

This article shows all the major version of the Java class file, for example, Java 17 (major version 61), Java 11 (55), Java 8 (52).

Java SE Major Version Hex
18 62 0x3E
17 61 0x3D
16 60 0x3C
15 59 0x3B
14 58 0x3A
13 57 0x39
12 56 0x38
11 55 0x37
10 54 0x36
9 53 0x35
8 52 0x34
7 51 0x33
6.0 50 0x32
5.0 49 0x31
1.4 48 0x30
1.3 47 0x2F
1.2 46 0x2E
1.1 45 0x2D

javap to print Java class file

In Java, we can use the javap command tool to find the major version of the Java class file.

Terminal

% javap -verbose ClassName | grep major

  major version: 61

In the above example, Java 17 (61) compiled the above ClassName.

References

About Author

author image
Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter. If you like my tutorials, consider make a donation to these charities.

Comments

Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments