changeset 13115:474db9ef5ee7

8085822: JEP 223: New Version-String Scheme (initial integration) Reviewed-by: erikj, dcubed, dholmes, alanb Contributed-by: Magnus Ihse Bursie <magnus.ihse.bursie@oracle.com>, Alejandro E Murillo <alejandro.murillo@oracle.com>, Kumar Srinivasan <kumar.x.srinivasan@oracle.com>
author ihse
date Thu, 11 Jun 2015 00:23:01 +0200
parents 1abd45df5480
children d937975320cc
files make/CompileDemos.gmk make/data/mainmanifest/manifest.mf make/gensrc/GensrcMisc.gmk make/launcher/Launcher-jdk.accessibility.gmk make/launcher/Launcher-jdk.pack200.gmk make/launcher/LauncherCommon.gmk make/lib/CoreLibraries.gmk src/java.base/share/classes/sun/misc/Version.java.template src/java.base/share/native/include/jvm.h src/java.base/share/native/launcher/defines.h src/java.base/share/native/launcher/main.c src/java.base/share/native/libjava/System.c src/java.base/share/native/libjava/Version.c src/java.base/share/native/libjava/jdk_util.c src/java.base/windows/native/common/version.rc src/java.desktop/windows/native/libawt/windows/awt.rc src/jdk.accessibility/windows/native/common/AccessBridgeStatusWindow.RC test/sun/misc/Version/Version.java
diffstat 18 files changed, 81 insertions(+), 151 deletions(-) [+]
line wrap: on
line diff
--- a/make/CompileDemos.gmk	Thu May 28 16:51:18 2015 -0700
+++ b/make/CompileDemos.gmk	Thu Jun 11 00:23:01 2015 +0200
@@ -55,7 +55,8 @@
   SOURCE_FILES := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf, \
   OUTPUT_FILE := $(SUPPORT_OUTPUTDIR)/demo/java-main-manifest.mf, \
   REPLACEMENTS := \
-      @@RELEASE@@ => $(RELEASE) ; \
+      @@VERSION_SPECIFICATION@@ => $(VERSION_SPECIFICATION) ; \
+      @@VERSION_SHORT@@ => $(VERSION_SHORT) ; \
       @@COMPANY_NAME@@ => $(COMPANY_NAME) , \
 ))
 
--- a/make/data/mainmanifest/manifest.mf	Thu May 28 16:51:18 2015 -0700
+++ b/make/data/mainmanifest/manifest.mf	Thu Jun 11 00:23:01 2015 +0200
@@ -1,7 +1,7 @@
 Manifest-Version: 1.0
 Specification-Title: Java Platform API Specification
-Specification-Version: 1.9
+Specification-Version: @@VERSION_SPECIFICATION@@
 Specification-Vendor: Oracle Corporation
 Implementation-Title: Java Runtime Environment
-Implementation-Version: @@RELEASE@@
+Implementation-Version: @@VERSION_SHORT@@
 Implementation-Vendor: @@COMPANY_NAME@@
--- a/make/gensrc/GensrcMisc.gmk	Thu May 28 16:51:18 2015 -0700
+++ b/make/gensrc/GensrcMisc.gmk	Thu Jun 11 00:23:01 2015 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -26,28 +26,18 @@
 ##########################################################################################
 # Install the launcher name, release version string, full version
 # string and the runtime name into the Version.java file.
-# To be printed by java -version
 
-# These dependencies should ideally be added to prerequesites for Version.java
-# but skip for now until we have better incremental build for java.
-#    $(call DependOnVariable, LAUNCHER_NAME) \
-#    $(call DependOnVariable, RELEASE) \
-#    $(call DependOnVariable, FULL_VERSION) \
-#    $(call DependOnVariable, RUNTIME_VERSION)
+$(eval $(call SetupTextFileProcessing, BUILD_VERSION_JAVA, \
+    SOURCE_FILES := $(JDK_TOPDIR)/src/java.base/share/classes/sun/misc/Version.java.template, \
+    OUTPUT_FILE := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/misc/Version.java, \
+    REPLACEMENTS := \
+        @@LAUNCHER_NAME@@ => $(LAUNCHER_NAME) ; \
+        @@RUNTIME_NAME@@ => $(RUNTIME_NAME) ; \
+        @@VERSION_SHORT@@ => $(VERSION_SHORT) ; \
+        @@VERSION_STRING@@ => $(VERSION_STRING), \
+))
 
-$(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/misc/Version.java: \
-    $(JDK_TOPDIR)/src/java.base/share/classes/sun/misc/Version.java.template
-	$(MKDIR) -p $(@D)
-	$(RM) $@ $@.tmp
-	$(ECHO) Generating sun/misc/Version.java
-	$(SED) -e 's/@@launcher_name@@/$(LAUNCHER_NAME)/g' \
-	    -e 's/@@java_version@@/$(RELEASE)/g' \
-	    -e 's/@@java_runtime_version@@/$(FULL_VERSION)/g' \
-	    -e 's/@@java_runtime_name@@/$(RUNTIME_NAME)/g' \
-	    $< > $@.tmp
-	$(MV) $@.tmp $@
-
-GENSRC_JAVA_BASE += $(SUPPORT_OUTPUTDIR)/gensrc/java.base/sun/misc/Version.java
+GENSRC_JAVA_BASE += $(BUILD_VERSION_JAVA)
 
 ##########################################################################################
 
--- a/make/launcher/Launcher-jdk.accessibility.gmk	Thu May 28 16:51:18 2015 -0700
+++ b/make/launcher/Launcher-jdk.accessibility.gmk	Thu Jun 11 00:23:01 2015 +0200
@@ -52,7 +52,7 @@
           -D "JDK_INTERNAL_NAME=jabswitch" \
           -D "JDK_FTYPE=0x01L", \
       MANIFEST := $(JABSWITCH_SRC)/jabswitch.manifest, \
-      MANIFEST_VERSION := $(JDK_VERSION_FOR_MANIFEST), \
+      MANIFEST_VERSION := $(VERSION_NUMBER_FOUR_POSITIONS), \
   ))
 
   TARGETS += $(BUILD_JABSWITCH)
--- a/make/launcher/Launcher-jdk.pack200.gmk	Thu May 28 16:51:18 2015 -0700
+++ b/make/launcher/Launcher-jdk.pack200.gmk	Thu Jun 11 00:23:01 2015 +0200
@@ -103,7 +103,7 @@
         -D "JDK_FTYPE=0x1L", \
     DEBUG_SYMBOLS := true, \
     MANIFEST := $(JDK_TOPDIR)/src/jdk.pack200/windows/native/unpack200/unpack200_proto.exe.manifest, \
-    MANIFEST_VERSION := $(JDK_VERSION_FOR_MANIFEST), \
+    MANIFEST_VERSION := $(VERSION_NUMBER_FOUR_POSITIONS), \
 ))
 
 ifneq ($(USE_EXTERNAL_LIBZ), true)
--- a/make/launcher/LauncherCommon.gmk	Thu May 28 16:51:18 2015 -0700
+++ b/make/launcher/LauncherCommon.gmk	Thu Jun 11 00:23:01 2015 +0200
@@ -164,9 +164,7 @@
       OPTIMIZATION := $$($1_OPTIMIZATION_ARG), \
       CFLAGS := $$($1_CFLAGS) \
           $(LAUNCHER_CFLAGS) \
-          -DFULL_VERSION='"$(FULL_VERSION)"' \
-          -DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \
-          -DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"' \
+          $(VERSION_CFLAGS) \
           -DLAUNCHER_NAME='"$(LAUNCHER_NAME)"' \
           -DPROGNAME='"$1"' $(DPACKAGEPATH) \
           $2, \
@@ -198,7 +196,7 @@
           -D "JDK_FTYPE=0x1L" \
           $7, \
       MANIFEST := $(JAVA_MANIFEST), \
-      MANIFEST_VERSION := $(JDK_VERSION_FOR_MANIFEST), \
+      MANIFEST_VERSION := $(VERSION_NUMBER_FOUR_POSITIONS), \
       CODESIGN := $$($1_CODESIGN), \
   )
 
--- a/make/lib/CoreLibraries.gmk	Thu May 28 16:51:18 2015 -0700
+++ b/make/lib/CoreLibraries.gmk	Thu Jun 11 00:23:01 2015 +0200
@@ -119,15 +119,6 @@
     -I$(SUPPORT_OUTPUTDIR)/headers/java.base \
     -DARCHPROPNAME='"$(OPENJDK_TARGET_CPU_OSARCH)"'
 
-LIBJAVA_CFLAGS += -DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \
-    -DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"' \
-    -DJDK_MICRO_VERSION='"$(JDK_MICRO_VERSION)"' \
-     -DJDK_BUILD_NUMBER='"$(JDK_BUILD_NUMBER)"'
-
-ifneq (, $(JDK_UPDATE_VERSION))
-  LIBJAVA_CFLAGS += -DJDK_UPDATE_VERSION='"$(JDK_UPDATE_VERSION)"'
-endif
-
 ifeq ($(OPENJDK_TARGET_OS), macosx)
   BUILD_LIBJAVA_java_props_md.c_CFLAGS := -x objective-c
   BUILD_LIBJAVA_java_props_macosx.c_CFLAGS := -x objective-c
@@ -146,6 +137,8 @@
     OPTIMIZATION := HIGH, \
     CFLAGS := $(CFLAGS_JDKLIB) \
         $(LIBJAVA_CFLAGS), \
+    System.c_CFLAGS := $(VERSION_CFLAGS), \
+    jdk_util.c_CFLAGS := $(VERSION_CFLAGS), \
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjava/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
--- a/src/java.base/share/classes/sun/misc/Version.java.template	Thu May 28 16:51:18 2015 -0700
+++ b/src/java.base/share/classes/sun/misc/Version.java.template	Thu Jun 11 00:23:01 2015 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,16 +30,16 @@
 
 
     private static final String launcher_name =
-        "@@launcher_name@@";
+        "@@LAUNCHER_NAME@@";
 
     private static final String java_version =
-        "@@java_version@@";
+        "@@VERSION_SHORT@@";
 
     private static final String java_runtime_name =
-        "@@java_runtime_name@@";
+        "@@RUNTIME_NAME@@";
 
     private static final String java_runtime_version =
-        "@@java_runtime_version@@";
+        "@@VERSION_STRING@@";
 
     static {
         init();
@@ -54,13 +54,13 @@
     private static boolean versionsInitialized = false;
     private static int jvm_major_version = 0;
     private static int jvm_minor_version = 0;
-    private static int jvm_micro_version = 0;
+    private static int jvm_security_version = 0;
     private static int jvm_update_version = 0;
     private static int jvm_build_number = 0;
     private static String jvm_special_version = null;
     private static int jdk_major_version = 0;
     private static int jdk_minor_version = 0;
-    private static int jdk_micro_version = 0;
+    private static int jdk_security_version = 0;
     private static int jdk_update_version = 0;
     private static int jdk_build_number = 0;
     private static String jdk_special_version = null;
@@ -146,16 +146,16 @@
 
 
     /**
-     * Returns the micro version of the running JVM if it's 1.6 or newer
+     * Returns the security version of the running JVM if it's 1.6 or newer
      * or any RE VM build. It will return 0 if it's an internal 1.5 or
      * 1.4.x build.
      * @since 1.6
      */
-    public static synchronized int jvmMicroVersion() {
+    public static synchronized int jvmSecurityVersion() {
         if (!versionsInitialized) {
             initVersions();
         }
-        return jvm_micro_version;
+        return jvm_security_version;
     }
 
     /**
@@ -217,14 +217,14 @@
     }
 
     /**
-     * Returns the micro version of the running JDK.
+     * Returns the security version of the running JDK.
      * @since 1.6
      */
-    public static synchronized int jdkMicroVersion() {
+    public static synchronized int jdkSecurityVersion() {
         if (!versionsInitialized) {
             initVersions();
         }
-        return jdk_micro_version;
+        return jdk_security_version;
     }
 
     /**
@@ -281,7 +281,7 @@
                 Character.isDigit(cs.charAt(4))) {
                 jvm_major_version = Character.digit(cs.charAt(0), 10);
                 jvm_minor_version = Character.digit(cs.charAt(2), 10);
-                jvm_micro_version = Character.digit(cs.charAt(4), 10);
+                jvm_security_version = Character.digit(cs.charAt(4), 10);
                 cs = cs.subSequence(5, cs.length());
                 if (cs.charAt(0) == '_' && cs.length() >= 3 &&
                     Character.isDigit(cs.charAt(1)) &&
--- a/src/java.base/share/native/include/jvm.h	Thu May 28 16:51:18 2015 -0700
+++ b/src/java.base/share/native/include/jvm.h	Thu Jun 11 00:23:01 2015 +0200
@@ -49,7 +49,7 @@
  * These functions allow the verifier and format checker to be written
  * in a VM-independent way.
  *
- * Third, this file contains various I/O and nerwork operations needed
+ * Third, this file contains various I/O and network operations needed
  * by the standard Java I/O and network APIs.
  */
 
@@ -1127,9 +1127,7 @@
  * ==========================================================================
  */
 typedef struct {
-    /* Naming convention of RE build version string: n.n.n[_uu[c]][-<identifier>]-bxx */
-    unsigned int jvm_version;   /* Consists of major, minor, micro (n.n.n) */
-                                /* and build number (xx) */
+    unsigned int jvm_version;  /* Follows JDK version string as specified by JEP-223 */
     unsigned int update_version : 8;         /* Update release version (uu) */
     unsigned int special_update_version : 8; /* Special update release version (c)*/
     unsigned int reserved1 : 16;
@@ -1150,7 +1148,7 @@
 
 #define JVM_VERSION_MAJOR(version) ((version & 0xFF000000) >> 24)
 #define JVM_VERSION_MINOR(version) ((version & 0x00FF0000) >> 16)
-#define JVM_VERSION_MICRO(version) ((version & 0x0000FF00) >> 8)
+#define JVM_VERSION_SECURITY(version) ((version & 0x0000FF00) >> 8)
 
 /* Build number is available only for RE builds.
  * It will be zero for internal builds.
@@ -1161,9 +1159,7 @@
 JVM_GetVersionInfo(JNIEnv* env, jvm_version_info* info, size_t info_size);
 
 typedef struct {
-    // Naming convention of RE build version string: n.n.n[_uu[c]][-<identifier>]-bxx
-    unsigned int jdk_version;   /* Consists of major, minor, micro (n.n.n) */
-                                /* and build number (xx) */
+    unsigned int jdk_version; /* JDK version string as specified by JEP-223 */
     unsigned int update_version : 8;         /* Update release version (uu) */
     unsigned int special_update_version : 8; /* Special update release version (c)*/
     unsigned int reserved1 : 16;
@@ -1186,9 +1182,9 @@
 
 #define JDK_VERSION_MAJOR(version) ((version & 0xFF000000) >> 24)
 #define JDK_VERSION_MINOR(version) ((version & 0x00FF0000) >> 16)
-#define JDK_VERSION_MICRO(version) ((version & 0x0000FF00) >> 8)
+#define JDK_VERSION_SECURITY(version) ((version & 0x0000FF00) >> 8)
 
-/* Build number is available only for RE build (i.e. JDK_BUILD_NUMBER is set to bNN)
+/* Build number is available only for RE build (i.e. JDK_BUILD_NUMBER is set to NN)
  * It will be zero for internal builds.
  */
 #define JDK_VERSION_BUILD(version) ((version & 0x000000FF))
--- a/src/java.base/share/native/launcher/defines.h	Thu May 28 16:51:18 2015 -0700
+++ b/src/java.base/share/native/launcher/defines.h	Thu Jun 11 00:23:01 2015 +0200
@@ -28,17 +28,20 @@
 
 #include "java.h"
 
+#define STR_HELPER(x) #x
+#define STR(x) STR_HELPER(x)
+
 /*
  * This file contains commonly defined constants used only by main.c
  * and should not be included by another file.
  */
-#ifndef FULL_VERSION
+#ifndef VERSION_STRING
 /* make sure the compilation fails */
-#error "FULL_VERSION must be defined"
+#error "VERSION_STRING must be defined"
 #endif
 
-#if defined(JDK_MAJOR_VERSION) && defined(JDK_MINOR_VERSION)
-#define DOT_VERSION JDK_MAJOR_VERSION "." JDK_MINOR_VERSION
+#if defined(VERSION_MAJOR) && defined(VERSION_MINOR)
+#define DOT_VERSION STR(VERSION_MAJOR) "." STR(VERSION_MINOR)
 #else
 /* make sure the compilation fails */
 #error "JDK_MAJOR_VERSION and JDK_MINOR_VERSION must be defined"
--- a/src/java.base/share/native/launcher/main.c	Thu May 28 16:51:18 2015 -0700
+++ b/src/java.base/share/native/launcher/main.c	Thu Jun 11 00:23:01 2015 +0200
@@ -125,7 +125,7 @@
     return JLI_Launch(margc, margv,
                    sizeof(const_jargs) / sizeof(char *), const_jargs,
                    sizeof(const_appclasspath) / sizeof(char *), const_appclasspath,
-                   FULL_VERSION,
+                   VERSION_STRING,
                    DOT_VERSION,
                    (const_progname != NULL) ? const_progname : *margv,
                    (const_launcher != NULL) ? const_launcher : *margv,
--- a/src/java.base/share/native/libjava/System.c	Thu May 28 16:51:18 2015 -0700
+++ b/src/java.base/share/native/libjava/System.c	Thu Jun 11 00:23:01 2015 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -208,13 +208,13 @@
     CHECK_NULL_RETURN(getPropID, NULL);
 
     PUTPROP(props, "java.specification.version",
-            JDK_MAJOR_VERSION "." JDK_MINOR_VERSION);
+            VERSION_SPECIFICATION);
     PUTPROP(props, "java.specification.name",
             "Java Platform API Specification");
     PUTPROP(props, "java.specification.vendor",
             JAVA_SPECIFICATION_VENDOR);
 
-    PUTPROP(props, "java.version", RELEASE);
+    PUTPROP(props, "java.version", VERSION_SHORT);
     PUTPROP(props, "java.vendor", VENDOR);
     PUTPROP(props, "java.vendor.url", VENDOR_URL);
     PUTPROP(props, "java.vendor.url.bug", VENDOR_URL_BUG);
--- a/src/java.base/share/native/libjava/Version.c	Thu May 28 16:51:18 2015 -0700
+++ b/src/java.base/share/native/libjava/Version.c	Thu Jun 11 00:23:01 2015 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -63,7 +63,7 @@
     JNU_CHECK_EXCEPTION_RETURN(env, JNI_FALSE);
     setStaticIntField(env, cls, "jvm_minor_version", JVM_VERSION_MINOR(info.jvm_version));
     JNU_CHECK_EXCEPTION_RETURN(env, JNI_FALSE);
-    setStaticIntField(env, cls, "jvm_micro_version", JVM_VERSION_MICRO(info.jvm_version));
+    setStaticIntField(env, cls, "jvm_security_version", JVM_VERSION_SECURITY(info.jvm_version));
     JNU_CHECK_EXCEPTION_RETURN(env, JNI_FALSE);
     setStaticIntField(env, cls, "jvm_build_number", JVM_VERSION_BUILD(info.jvm_version));
     JNU_CHECK_EXCEPTION_RETURN(env, JNI_FALSE);
@@ -94,7 +94,7 @@
     JNU_CHECK_EXCEPTION(env);
     setStaticIntField(env, cls, "jdk_minor_version", JDK_VERSION_MINOR(info.jdk_version));
     JNU_CHECK_EXCEPTION(env);
-    setStaticIntField(env, cls, "jdk_micro_version", JDK_VERSION_MICRO(info.jdk_version));
+    setStaticIntField(env, cls, "jdk_security_version", JDK_VERSION_SECURITY(info.jdk_version));
     JNU_CHECK_EXCEPTION(env);
     setStaticIntField(env, cls, "jdk_build_number", JDK_VERSION_BUILD(info.jdk_version));
     JNU_CHECK_EXCEPTION(env);
--- a/src/java.base/share/native/libjava/jdk_util.c	Thu May 28 16:51:18 2015 -0700
+++ b/src/java.base/share/native/libjava/jdk_util.c	Thu Jun 11 00:23:01 2015 +0200
@@ -31,72 +31,22 @@
 #include "jvm.h"
 #include "jdk_util.h"
 
-#ifndef JDK_UPDATE_VERSION
-   /* if not defined set to 00 */
-   #define JDK_UPDATE_VERSION "00"
-#endif
-
 JNIEXPORT void
 JDK_GetVersionInfo0(jdk_version_info* info, size_t info_size) {
-    /* These JDK_* macros are set at Makefile or the command line */
-    const unsigned int jdk_major_version =
-        (unsigned int) atoi(JDK_MAJOR_VERSION);
-    const unsigned int jdk_minor_version =
-        (unsigned int) atoi(JDK_MINOR_VERSION);
-    const unsigned int jdk_micro_version =
-        (unsigned int) atoi(JDK_MICRO_VERSION);
-
-    const char* jdk_build_string = JDK_BUILD_NUMBER;
-    char build_number[4];
-    unsigned int jdk_build_number = 0;
-
-    const char* jdk_update_string = JDK_UPDATE_VERSION;
-    unsigned int jdk_update_version = 0;
-    char update_ver[3];
-    char jdk_special_version = '\0';
-
-    /* If the JDK_BUILD_NUMBER is of format bXX and XX is an integer
-     * XX is the jdk_build_number.
-     */
-    size_t len = strlen(jdk_build_string);
-    if (jdk_build_string[0] == 'b' && len >= 2) {
-        size_t i = 0;
-        for (i = 1; i < len; i++) {
-            if (isdigit(jdk_build_string[i])) {
-                build_number[i-1] = jdk_build_string[i];
-            } else {
-                // invalid build number
-                i = -1;
-                break;
-            }
-        }
-        if (i == len) {
-            build_number[len-1] = '\0';
-            jdk_build_number = (unsigned int) atoi(build_number) ;
-        }
-    }
-
-    assert(jdk_build_number <= 255);
-
-    if (strlen(jdk_update_string) == 2 || strlen(jdk_update_string) == 3) {
-        if (isdigit(jdk_update_string[0]) && isdigit(jdk_update_string[1])) {
-            update_ver[0] = jdk_update_string[0];
-            update_ver[1] = jdk_update_string[1];
-            update_ver[2] = '\0';
-            jdk_update_version = (unsigned int) atoi(update_ver);
-            if (strlen(jdk_update_string) == 3) {
-                jdk_special_version = jdk_update_string[2];
-            }
-        }
-    }
+    /* These VERSION_* macros are given by the build system */
+    const unsigned int version_major = VERSION_MAJOR;
+    const unsigned int version_minor = VERSION_MINOR;
+    const unsigned int version_security = VERSION_SECURITY;
+    const unsigned int version_build = VERSION_BUILD;
 
     memset(info, 0, info_size);
-    info->jdk_version = ((jdk_major_version & 0xFF) << 24) |
-                        ((jdk_minor_version & 0xFF) << 16) |
-                        ((jdk_micro_version & 0xFF) << 8)  |
-                        (jdk_build_number & 0xFF);
-    info->update_version = jdk_update_version;
-    info->special_update_version = (unsigned int) jdk_special_version;
+    info->jdk_version = ((version_major & 0xFF) << 24) |
+                        ((version_minor & 0xFF) << 16) |
+                        ((version_security & 0xFF) << 8)  |
+                        (version_build & 0xFF);
+    // FIXME: update_version and special_update_version does not make sense anymore.
+    info->update_version = 0;
+    info->special_update_version = 0;
     info->thread_park_blocker = 1;
     // Advertise presence of sun.misc.PostVMInitHook:
     // future optimization: detect if this is enabled.
--- a/src/java.base/windows/native/common/version.rc	Thu May 28 16:51:18 2015 -0700
+++ b/src/java.base/windows/native/common/version.rc	Thu Jun 11 00:23:01 2015 +0200
@@ -1,5 +1,5 @@
 //
-// Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
+// Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
 // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 //
 // This code is free software; you can redistribute it and/or modify it
@@ -58,7 +58,7 @@
             VALUE "CompanyName",      XSTR(JDK_COMPANY)       "\0"
             VALUE "FileDescription",  XSTR(JDK_COMPONENT)     "\0"
             VALUE "FileVersion",      XSTR(JDK_VER)           "\0"
-            VALUE "Full Version",     XSTR(JDK_BUILD_ID)      "\0"
+            VALUE "Full Version",     XSTR(JDK_VERSION_STRING) "\0"
 	    VALUE "InternalName",     XSTR(JDK_INTERNAL_NAME) "\0"
             VALUE "LegalCopyright",   XSTR(JDK_COPYRIGHT)     "\0"
             VALUE "OriginalFilename", XSTR(JDK_FNAME)         "\0"
--- a/src/java.desktop/windows/native/libawt/windows/awt.rc	Thu May 28 16:51:18 2015 -0700
+++ b/src/java.desktop/windows/native/libawt/windows/awt.rc	Thu Jun 11 00:23:01 2015 +0200
@@ -1,5 +1,5 @@
-// 
-// Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
+//
+// Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
 // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 //
 // This code is free software; you can redistribute it and/or modify it
@@ -69,7 +69,7 @@
             VALUE "CompanyName",      XSTR(JDK_COMPANY)       "\0"
             VALUE "FileDescription",  XSTR(JDK_COMPONENT)     "\0"
             VALUE "FileVersion",      XSTR(JDK_VER)           "\0"
-            VALUE "Full Version",     XSTR(JDK_BUILD_ID)      "\0"
+            VALUE "Full Version",     XSTR(JDK_VERSION_STRING) "\0"
 	    VALUE "InternalName",     XSTR(JDK_INTERNAL_NAME) "\0"
             VALUE "LegalCopyright",   XSTR(JDK_COPYRIGHT)     "\0"
             VALUE "OriginalFilename", XSTR(JDK_FNAME)         "\0"
--- a/src/jdk.accessibility/windows/native/common/AccessBridgeStatusWindow.RC	Thu May 28 16:51:18 2015 -0700
+++ b/src/jdk.accessibility/windows/native/common/AccessBridgeStatusWindow.RC	Thu Jun 11 00:23:01 2015 +0200
@@ -44,7 +44,7 @@
     LTEXT           "Status:",IDC_STATIC,11,149,23,8
     EDITTEXT        cWindowsID,67,39,121,13,ES_READONLY
     LTEXT           "Windows ID:",IDC_STATIC,21,41,42,8
-    EDITTEXT        cCallInfo,12,65,184,75,ES_MULTILINE | ES_AUTOVSCROLL | 
+    EDITTEXT        cCallInfo,12,65,184,75,ES_MULTILINE | ES_AUTOVSCROLL |
                     ES_AUTOHSCROLL | ES_READONLY | WS_VSCROLL
     GROUPBOX        "Call info",IDC_STATIC,4,55,197,90
     EDITTEXT        cInvokedByText,67,1,121,13,ES_READONLY
@@ -67,12 +67,12 @@
 // TEXTINCLUDE
 //
 
-1 TEXTINCLUDE DISCARDABLE 
+1 TEXTINCLUDE DISCARDABLE
 BEGIN
     "resource.h\0"
 END
 
-2 TEXTINCLUDE DISCARDABLE 
+2 TEXTINCLUDE DISCARDABLE
 BEGIN
     "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
     "#include ""windows.h""\r\n"
@@ -80,7 +80,7 @@
     "\0"
 END
 
-3 TEXTINCLUDE DISCARDABLE 
+3 TEXTINCLUDE DISCARDABLE
 BEGIN
     "\r\n"
     "\0"
@@ -95,7 +95,7 @@
 //
 
 #ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO DISCARDABLE 
+GUIDELINES DESIGNINFO DISCARDABLE
 BEGIN
     "ACCESSBRIDGESTATUSWINDOW", DIALOG
     BEGIN
@@ -142,7 +142,7 @@
             VALUE "CompanyName", XSTR(JDK_COMPANY) "\0"
             VALUE "FileDescription", XSTR(JDK_COMPONENT) "\0"
             VALUE "FileVersion", XSTR(JDK_VER) "\0"
-            VALUE "Full Version", XSTR(JDK_BUILD_ID) "\0"
+            VALUE "Full Version", XSTR(JDK_VERSION_STRING) "\0"
             VALUE "InternalName", XSTR(JDK_INTERNAL_NAME) "\0"
             VALUE "LegalCopyright", XSTR(JDK_COPYRIGHT) "\0"
             VALUE "OriginalFilename", XSTR(JDK_FNAME) "\0"
@@ -172,4 +172,3 @@
 
 /////////////////////////////////////////////////////////////////////////////
 #endif    // not APSTUDIO_INVOKED
-
--- a/test/sun/misc/Version/Version.java	Thu May 28 16:51:18 2015 -0700
+++ b/test/sun/misc/Version/Version.java	Thu Jun 11 00:23:01 2015 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,7 +37,7 @@
         VersionInfo jdk = newVersionInfo(System.getProperty("java.runtime.version"));
         VersionInfo v1 = new VersionInfo(jdkMajorVersion(),
                                          jdkMinorVersion(),
-                                         jdkMicroVersion(),
+                                         jdkSecurityVersion(),
                                          jdkUpdateVersion(),
                                          jdkSpecialVersion(),
                                          jdkBuildNumber());
@@ -48,7 +48,7 @@
         VersionInfo jvm = newVersionInfo(System.getProperty("java.vm.version"));
         VersionInfo v2 = new VersionInfo(jvmMajorVersion(),
                                          jvmMinorVersion(),
-                                         jvmMicroVersion(),
+                                         jvmSecurityVersion(),
                                          jvmUpdateVersion(),
                                          jvmSpecialVersion(),
                                          jvmBuildNumber());