"Microsoft dev here, the internal rumours are that early testing revealed just how many third party products that had code of the form
if(version.StartsWith("Windows 9"))
{ /* 95 and 98 */
} else {
and that this was the pragmatic solution to avoid that."“Our London office primarily serves the MSN and Xbox teams, although the ground floor is set up for hot-desking to ensure that any of our employees can work from this office when they are in London.”
http://careers.microsoft.com/careers/en/az/offices.aspx#GB_L...
“Microsoft dev” doesn't mean “Windows kernel hacker”
call it "windows9" with no space and it doesn't collide with any startsWith("Windows 9") calls.
If someone looks up the OS name instead of the kernel number, the app will behave badly.
http://jonisalonen.com/2013/where-java-system-properties-com...
And this code:
http://hg.openjdk.java.net/jdk7/jdk7/jdk/file/tip/src/share/...
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)"; 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:
/*
* From MSDN OSVERSIONINFOEX and SYSTEM_INFO documentation:
*
* "Because the version numbers for Windows Server 2003
* and Windows XP 6u4 bit are identical, you must also test
* whether the wProductType member is VER_NT_WORKSTATION.
* and si.wProcessorArchitecture is
* PROCESSOR_ARCHITECTURE_AMD64 (which is 9)
* If it is, the operating system is Windows XP 64 bit;
* otherwise, it is Windows Server 2003."
*/
if(ver.wProductType == VER_NT_WORKSTATION &&
si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) {
sprops.os_name = "Windows XP"; /* 64 bit */
} else {
sprops.os_name = "Windows 2003";
}
break;
default: sprops.os_name = "Windows NT (unknown)"; break;
}
} else if (ver.dwMajorVersion == 6) {
/*
* See table in MSDN OSVERSIONINFOEX documentation.
*/
if (ver.wProductType == VER_NT_WORKSTATION) {
switch (ver.dwMinorVersion) {
case 0: sprops.os_name = "Windows Vista"; break;
case 1: sprops.os_name = "Windows 7"; break;
default: sprops.os_name = "Windows NT (unknown)";
}
} else {
switch (ver.dwMinorVersion) {
case 0: sprops.os_name = "Windows Server 2008"; break;
case 1: sprops.os_name = "Windows Server 2008 R2"; break;
default: sprops.os_name = "Windows NT (unknown)";
}
}
} else {
sprops.os_name = "Windows NT (unknown)";
}
break;
default:
sprops.os_name = "Windows (unknown)";
break;
}
Java asks for number and derives OS name from it.In any case, nobody's arguing that os.name in Java is set incorrectly. The argument is that Java programs are using os.name incorrectly to make decisions. If this version of Windows was to be called Windows 9, that function would be (correctly) updated to return "Windows 9" and every Java program that did startsWith("Windows 9") would start misbehaving.
What I mean is, for a user-land program to break, all it needs is that the platform underneath it identifies "Windows(r) 9", whose version is 6.3 as "Windows 9". Maybe they also thought it was too much to count on everyone reporting it as "Windows(r) 9"?
For something as big as Java I'm sure that's easily communicable. Maybe less so with the breadth of libraries and platforms available..
"Windows 9", "Windows 95", and "Windows 98" all start with "Windows 9".
[Citation Needed]