diff --git a/src/java.base/share/classes/java/lang/System.java b/src/java.base/share/classes/java/lang/System.java index dead2892e1c..6de8508d248 100644 --- a/src/java.base/share/classes/java/lang/System.java +++ b/src/java.base/share/classes/java/lang/System.java @@ -753,7 +753,10 @@ public final class System { * {@systemProperty java.specification.name} * Java Runtime Environment specification name * {@systemProperty java.class.version} - * Java class format version number + * {@linkplain java.lang.reflect.ClassFileFormatVersion#latest() Latest} + * Java class file format version recognized by the Java runtime as {@code "MAJOR.MINOR"} + * where {@link java.lang.reflect.ClassFileFormatVersion#major() MAJOR} and {@code MINOR} + * are both formatted as decimal integers * {@systemProperty java.class.path} * Java class path (refer to * {@link ClassLoader#getSystemClassLoader()} for details) diff --git a/src/java.base/share/classes/java/lang/reflect/ClassFileFormatVersion.java b/src/java.base/share/classes/java/lang/reflect/ClassFileFormatVersion.java index 81ceaa96f50..c195ca9ad9b 100644 --- a/src/java.base/share/classes/java/lang/reflect/ClassFileFormatVersion.java +++ b/src/java.base/share/classes/java/lang/reflect/ClassFileFormatVersion.java @@ -36,6 +36,13 @@ package java.lang.reflect; * added to model future releases of the Java Virtual Machine * Specification. * + * @apiNote + * The complete version used in a class file includes a major version + * and a minor version; this enum only models the major version. A + * Java virtual machine implementation is required to support a range + * of major versions; see the corresponding edition of the The + * Java Virtual Machine Specification for details. + * * @since 20 * @see System#getProperties System property {@code java.class.version} * @see java.compiler/javax.lang.model.SourceVersion @@ -64,7 +71,7 @@ public enum ClassFileFormatVersion { RELEASE_1(45), /** - * The version recognized by the Java 2 Platform, Standard Edition, + * The version introduced by the Java 2 Platform, Standard Edition, * v 1.2. * * The format described in The Java Virtual Machine @@ -74,19 +81,19 @@ public enum ClassFileFormatVersion { RELEASE_2(46), /** - * The version recognized by the Java 2 Platform, Standard Edition, + * The version introduced by the Java 2 Platform, Standard Edition, * v 1.3. */ RELEASE_3(47), /** - * The version recognized by the Java 2 Platform, Standard Edition, + * The version introduced by the Java 2 Platform, Standard Edition, * v 1.4. */ RELEASE_4(48), /** - * The version recognized by the Java 2 Platform, Standard + * The version introduced by the Java 2 Platform, Standard * Edition 5.0. * * @see