JDK-6220825 : System property os.name should be "Windows Vista" on Windows Vista
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 3.2,1.4.2_12,5.0u7,6
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows,windows_vista
  • CPU: generic,x86
  • Submitted: 2005-01-24
  • Updated: 2010-12-08
  • Resolved: 2005-11-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other JDK 6
1.4.2_14Fixed 6 b62Fixed
Related Reports
Duplicate :  
Relates :  
Description
System.getProperty("os.name") on Longhorn preview release returns "Windows NT (unknown)".  Windows java_props_md.c will have to be updated to recognize Windows "Longhorn" once the official major/minor version and the official OS name for Longhorn is released.

###@###.### 2005-1-24 18:23:19 GMT

Comments
EVALUATION I've updated the synopsis to a user-meaningful one instead of an implementor-meaningful one.
10-04-2006

EVALUATION I've applied the suggested fix and verified that it works on Windows Vista (beta2).
27-10-2005

SUGGESTED FIX --- /tmp/geta15954 2005-10-07 13:01:19.575267800 -0700 +++ java_props_md.c 2005-10-07 12:48:21.916143000 -0700 @@ -599,66 +599,54 @@ * Windows 98 4 10 * Windows ME 4 90 * Windows 3.51 3 51 * Windows NT 4.0 4 0 * Windows 2000 5 0 * Windows XP 5 1 * Windows Server 2003 family 5 2 + * Windows Vista 6 0 * * This mapping will presumably be augmented as new Windows * versions are released. */ switch (ver.dwPlatformId) { case VER_PLATFORM_WIN32s: sprops.os_name = "Windows 3.1"; break; case VER_PLATFORM_WIN32_WINDOWS: if (ver.dwMajorVersion == 4) { switch (ver.dwMinorVersion) { - case 0: - sprops.os_name = "Windows 95"; - break; - case 10: - sprops.os_name = "Windows 98"; - break; - case 90: - sprops.os_name = "Windows Me"; - break; - default: - sprops.os_name = "Windows 9X (unknown)"; + case 0: sprops.os_name = "Windows 95"; break; + case 10: sprops.os_name = "Windows 98"; break; + case 90: sprops.os_name = "Windows Me"; break; + default: sprops.os_name = "Windows 9X (unknown)"; break; } } else { sprops.os_name = "Windows 9X (unknown)"; } break; case VER_PLATFORM_WIN32_NT: if (ver.dwMajorVersion <= 4) { sprops.os_name = "Windows NT"; } else if (ver.dwMajorVersion == 5) { switch (ver.dwMinorVersion) { - case 0: - sprops.os_name = "Windows 2000"; - break; - case 1: - sprops.os_name = "Windows XP"; - break; - case 2: - sprops.os_name = "Windows 2003"; - break; - default: - sprops.os_name = "Windows NT (unknown)"; - break; - } + case 0: sprops.os_name = "Windows 2000"; break; + case 1: sprops.os_name = "Windows XP"; break; + case 2: sprops.os_name = "Windows 2003"; break; + default: sprops.os_name = "Windows NT (unknown)"; break; + } + } else if (ver.dwMajorVersion == 6) { + sprops.os_name = "Windows Vista"; } else { sprops.os_name = "Windows NT (unknown)"; } break; default: - sprops.os_name = "Windows (unknown)"; - break; + sprops.os_name = "Windows (unknown)"; + break; } sprintf(buf, "%d.%d", ver.dwMajorVersion, ver.dwMinorVersion); sprops.os_version = strdup(buf); #if _M_IA64 sprops.os_arch = "ia64"; #elif _M_AMD64 sprops.os_arch = "amd64";
07-10-2005

EVALUATION Yup. ###@###.### 2005-1-26 00:01:32 GMT
24-01-2005