7173645: (props) System.getProperty("os.name") should return "Windows Server 2012" for Windows Server 2012
authorkhazra
Wed, 06 Jun 2012 11:37:08 -0700
changeset 12873 e7c4a8144e66
parent 12872 16fa902b1469
child 12874 14df9c7c18e1
child 12876 e1e6355c440a
7173645: (props) System.getProperty("os.name") should return "Windows Server 2012" for Windows Server 2012 Summary: Enable Windows Server 2012 to be recognized as "os.name" Reviewed-by: alanb, dholmes, chegar
jdk/src/windows/native/java/lang/java_props_md.c
--- a/jdk/src/windows/native/java/lang/java_props_md.c	Wed Jun 06 17:59:29 2012 +0100
+++ b/jdk/src/windows/native/java/lang/java_props_md.c	Wed Jun 06 11:37:08 2012 -0700
@@ -404,6 +404,7 @@
          * Windows 7                    6               1  (VER_NT_WORKSTATION)
          * Windows Server 2008 R2       6               1  (!VER_NT_WORKSTATION)
          * Windows 8                    6               2  (VER_NT_WORKSTATION)
+         * Windows Server 2012          6               2  (!VER_NT_WORKSTATION)
          *
          * This mapping will presumably be augmented as new Windows
          * versions are released.
@@ -467,6 +468,7 @@
                     switch (ver.dwMinorVersion) {
                     case  0: sprops.os_name = "Windows Server 2008";    break;
                     case  1: sprops.os_name = "Windows Server 2008 R2"; break;
+                    case  2: sprops.os_name = "Windows Server 2012";    break;
                     default: sprops.os_name = "Windows NT (unknown)";
                     }
                 }