8020191: System.getProperty("os.name") returns "Windows NT (unknown)" on Windows 8.1
Reviewed-by: alanb, khazra, chegar
--- a/jdk/src/windows/native/java/lang/java_props_md.c Fri Aug 02 08:59:37 2013 +0800
+++ b/jdk/src/windows/native/java/lang/java_props_md.c Fri Aug 02 13:16:43 2013 +0400
@@ -443,6 +443,7 @@
case 0: sprops.os_name = "Windows Vista"; break;
case 1: sprops.os_name = "Windows 7"; break;
case 2: sprops.os_name = "Windows 8"; break;
+ case 3: sprops.os_name = "Windows 8.1"; break;
default: sprops.os_name = "Windows NT (unknown)";
}
} else {
@@ -450,6 +451,7 @@
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;
+ case 3: sprops.os_name = "Windows Server 2012 R2"; break;
default: sprops.os_name = "Windows NT (unknown)";
}
}
--- a/jdk/src/windows/resource/java.manifest Fri Aug 02 08:59:37 2013 +0800
+++ b/jdk/src/windows/resource/java.manifest Fri Aug 02 13:16:43 2013 +0400
@@ -44,8 +44,14 @@
<!-- Indicate this JDK version is Windows 7 compatible -->
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
+ <!-- Windows Vista -->
+ <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
+ <!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
- <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
+ <!-- Windows 8 -->
+ <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
+ <!-- Windows 8.1 -->
+ <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
</application>
</compatibility>