7170169: (props) System.getProperty("os.name") should return "Windows 8" when run on Windows 8
Summary: Enable Windows Version 6.2 to be recognized as Windows 8
Reviewed-by: darcy, dholmes, alanb, chegar
--- a/jdk/src/windows/native/java/lang/java_props_md.c Wed May 23 15:51:10 2012 +0800
+++ b/jdk/src/windows/native/java/lang/java_props_md.c Wed May 23 10:41:45 2012 -0700
@@ -403,6 +403,7 @@
* Windows Server 2008 6 0 (!VER_NT_WORKSTATION)
* Windows 7 6 1 (VER_NT_WORKSTATION)
* Windows Server 2008 R2 6 1 (!VER_NT_WORKSTATION)
+ * Windows 8 6 2 (VER_NT_WORKSTATION)
*
* This mapping will presumably be augmented as new Windows
* versions are released.
@@ -459,6 +460,7 @@
switch (ver.dwMinorVersion) {
case 0: sprops.os_name = "Windows Vista"; break;
case 1: sprops.os_name = "Windows 7"; break;
+ case 2: sprops.os_name = "Windows 8"; break;
default: sprops.os_name = "Windows NT (unknown)";
}
} else {