--- old/make/gensrc/GensrcMisc.gmk 2018-12-04 11:11:34.077109413 -0500 +++ new/make/gensrc/GensrcMisc.gmk 2018-12-04 11:11:33.909108580 -0500 @@ -36,6 +36,7 @@ @@VERSION_SHORT@@ => $(VERSION_SHORT) ; \ @@VERSION_STRING@@ => $(VERSION_STRING) ; \ @@VERSION_NUMBER@@ => $(VERSION_NUMBER) ; \ + @@VERSION_SPECIFICATION@@ => $(VERSION_SPECIFICATION) ; \ @@VERSION_PRE@@ => $(VERSION_PRE) ; \ @@VERSION_BUILD@@ => $(VERSION_BUILD) ; \ @@VERSION_OPT@@ => $(VERSION_OPT) ; \ --- old/src/java.base/share/classes/java/lang/VersionProps.java.template 2018-12-04 11:11:34.825113122 -0500 +++ new/src/java.base/share/classes/java/lang/VersionProps.java.template 2018-12-04 11:11:34.653112270 -0500 @@ -51,6 +51,9 @@ private static final String VERSION_NUMBER = "@@VERSION_NUMBER@@"; + private static final String VERSION_SPECIFICATION = + "@@VERSION_SPECIFICATION@@"; + private static final String VERSION_BUILD = "@@VERSION_BUILD@@"; @@ -97,7 +100,7 @@ props.setProperty("java.class.version", CLASSFILE_MAJOR_MINOR); - props.setProperty("java.specification.version", VERSION_NUMBER); + props.setProperty("java.specification.version", VERSION_SPECIFICATION); props.setProperty("java.specification.name", "Java Platform API Specification"); props.setProperty("java.specification.vendor", "Oracle Corporation"); --- old/test/jdk/java/lang/System/PropertyTest.java 2018-12-04 11:11:35.597116951 -0500 +++ new/test/jdk/java/lang/System/PropertyTest.java 2018-12-04 11:11:35.425116098 -0500 @@ -231,6 +231,15 @@ Assert.assertNotNull(props.getProperty(name), name); } + @Test + static void javaSpecVersion() { + String specVersion = System.getProperty("java.specification.version"); + int specVer = Integer.valueOf(specVersion); + + Assert.assertEquals(specVer, Runtime.version().feature(), "java.specification.version " + + "does not match runtime version"); + } + @SuppressWarnings("raw_types") @Test(enabled=false) public static void main(String[] args) {