Java Class File Format Major Version Numbers Decoded
The Java Virtual Machine (JVM) maintains version numbers for class files to ensure compatibility during execution. These version numbers, referred to as major versions, play a crucial role in determining which JVM can run a particular class file.
Major Version Numbers
The following table provides a comprehensive list of Java major version numbers and their corresponding Java versions:
Java Version | Major Version |
---|---|
23 | 67 |
22 | 66 |
21 | 65 |
20 | 64 |
19 | 63 |
18 | 62 |
17 | 61 |
16 | 60 |
15 | 59 |
14 | 58 |
13 | 57 |
12 | 56 |
11 | 55 |
10 | 54 |
9 | 53 |
8 | 52 |
7 | 51 |
6 | 50 |
5 | 49 |
1.4 | 48 |
1.3 | 47 |
1.2 | 46 |
1.1 | 45 |
1.0.2 | 45 |
Source of the List
The provided list of major version numbers originated from the class version stored in the class file. This version resides in the eighth byte offset of the file and indicates which Java version the class file is intended for.
Reference Materials
For additional information on class file versions:
The above is the detailed content of How Do Java Major Version Numbers Determine JVM Compatibility?. For more information, please follow other related articles on the PHP Chinese website!