Home > Java > javaTutorial > How Do Java Major Version Numbers Determine JVM Compatibility?

How Do Java Major Version Numbers Determine JVM Compatibility?

Patricia Arquette
Release: 2024-12-27 03:45:13
Original
271 people have browsed it

How Do Java Major Version Numbers Determine JVM Compatibility?

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:

  • Oracle Java Documentation: [Java Virtual Machine Specification](https://docs.oracle.com/javase/specs/jvms/se11/html/jvms-4.html#jvms-4.1)
  • Wikipedia: [Java Class File](https://en.wikipedia.org/wiki/Java_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!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template