JDK-8358016 : Address versions and preview features in JVMS Chapter 1
  • Type: Enhancement
  • Component: specification
  • Sub-Component: vm
  • Affected Version: 25
  • Priority: P4
  • Status: In Progress
  • Resolution: Unresolved
  • Submitted: 2025-05-29
  • Updated: 2025-06-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 25
25Unresolved
Related Reports
Relates :  
Relates :  
Description
JLS properly introduces the concept of preview features, which are morally part of the specification but exist outside the document, in 1.5 as part of its introductory chapter.

JVMS attempts to discuss preview features when it describes the validation rules associated with the minor version number (4.1), but does not address the relationship of the different documents, and misses the opportunity to introduce this concept as foundational. An analog to JLS 1.5 should be added to Chapter 1 of JVMS.

In order to effectively discuss preview features, it's important to understand class file version numbers. These can be addressed in 1.2, which already introduces the class file format. This is also a good opportunity to move the always-growing Table 4.1-A into a more appropriate home—note that the contents of the table are only of historical interest, and (aside from the last row) do not influence the behavior of the JVM being specified in this document; its inclusion in 4.1 sort of derails the item-by-item presentation of rules about the `ClassFile` structure. A historical discussion of version numbers is better suited to the introduction.
Comments
This is also a good opportunity to refocus JLS 1.5 on preview language features, specifically, to complement JVMS 1.5, which discusses preview VM features, and the API specs, which discuss preview library features. Adding some subsections to both JLS 1.5 and JVMS 1.5 helps, with a distinct section existing simply to discuss the preview features of this release.
06-06-2025

Some background from Alex in a comment from JLS section 1.5: "If, in time, preview features appear that are truly VM-only (no Java language surface and no Java SE API exposure), then it would be proper for the JVMS to define "preview VM feature" in a new section that corresponds to JLS 1.5. Until then, the only mention of preview features in the JVMS will be in 4.1, to formalize the role of the minor version 65535, and in 4.7, where preview language features drive class file attributes." We don't have such a VM-only feature in Java 25, but I think this is a worthwhile move anyway: first, because *any* JVM spec changes that exist outside the JVMS document ought to be properly acknowledged from within the document; and second, because the discussion about policies of support for preview features across JVM versions (references to a generic "Java SE N") properly belongs in Chapter 1, not while defining rules for the handling of class files in this specific release. That is, Chapter 1 can exist "outside of" JVMS in a way that later chapters should not.
29-05-2025