@@ -419,17 +419,6 @@ GetJavaProperties(JNIEnv* env)
419419 * Operating system dwMajorVersion dwMinorVersion
420420 * ================== ============== ==============
421421 *
422- * Windows 95 4 0
423- * Windows 98 4 10
424- * Windows ME 4 90
425- * Windows 3.51 3 51
426- * Windows NT 4.0 4 0
427- * Windows 2000 5 0
428- * Windows XP 32 bit 5 1
429- * Windows Server 2003 family 5 2
430- * Windows XP 64 bit 5 2
431- * where ((&ver.wServicePackMinor) + 2) = 1
432- * and si.wProcessorArchitecture = 9
433422 * Windows Vista family 6 0 (VER_NT_WORKSTATION)
434423 * Windows Server 2008 6 0 (!VER_NT_WORKSTATION)
435424 * Windows 7 6 1 (VER_NT_WORKSTATION)
@@ -452,61 +441,19 @@ GetJavaProperties(JNIEnv* env)
452441 * versions are released.
453442 */
454443 switch (platformId ) {
455- case VER_PLATFORM_WIN32_WINDOWS :
456- if (majorVersion == 4 ) {
457- switch (minorVersion ) {
458- case 0 : sprops .os_name = "Windows 95" ; break ;
459- case 10 : sprops .os_name = "Windows 98" ; break ;
460- case 90 : sprops .os_name = "Windows Me" ; break ;
461- default : sprops .os_name = "Windows 9X (unknown)" ; break ;
462- }
463- } else {
464- sprops .os_name = "Windows 9X (unknown)" ;
465- }
466- break ;
467444 case VER_PLATFORM_WIN32_NT :
468- if (majorVersion <= 4 ) {
469- sprops .os_name = "Windows NT" ;
470- } else if (majorVersion == 5 ) {
471- switch (minorVersion ) {
472- case 0 : sprops .os_name = "Windows 2000" ; break ;
473- case 1 : sprops .os_name = "Windows XP" ; break ;
474- case 2 :
475- /*
476- * From MSDN OSVERSIONINFOEX and SYSTEM_INFO documentation:
477- *
478- * "Because the version numbers for Windows Server 2003
479- * and Windows XP 6u4 bit are identical, you must also test
480- * whether the wProductType member is VER_NT_WORKSTATION.
481- * and si.wProcessorArchitecture is
482- * PROCESSOR_ARCHITECTURE_AMD64 (which is 9)
483- * If it is, the operating system is Windows XP 64 bit;
484- * otherwise, it is Windows Server 2003."
485- */
486- if (is_workstation && is_64bit ) {
487- sprops .os_name = "Windows XP" ; /* 64 bit */
488- } else {
489- sprops .os_name = "Windows 2003" ;
490- }
491- break ;
492- default : sprops .os_name = "Windows NT (unknown)" ; break ;
493- }
494- } else if (majorVersion == 6 ) {
445+ if (majorVersion == 6 ) {
495446 /*
496447 * See table in MSDN OSVERSIONINFOEX documentation.
497448 */
498449 if (is_workstation ) {
499450 switch (minorVersion ) {
500- case 0 : sprops .os_name = "Windows Vista" ; break ;
501- case 1 : sprops .os_name = "Windows 7" ; break ;
502451 case 2 : sprops .os_name = "Windows 8" ; break ;
503452 case 3 : sprops .os_name = "Windows 8.1" ; break ;
504453 default : sprops .os_name = "Windows NT (unknown)" ;
505454 }
506455 } else {
507456 switch (minorVersion ) {
508- case 0 : sprops .os_name = "Windows Server 2008" ; break ;
509- case 1 : sprops .os_name = "Windows Server 2008 R2" ; break ;
510457 case 2 : sprops .os_name = "Windows Server 2012" ; break ;
511458 case 3 : sprops .os_name = "Windows Server 2012 R2" ; break ;
512459 default : sprops .os_name = "Windows NT (unknown)" ;
0 commit comments