United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7170169 (props) System.getProperty("os.name") should return "Windows 8" when run on Windows 8
JDK-7170169 : (props) System.getProperty("os.name") should return "Windows 8" when run on Windows 8

Details
Type:
Enhancement
Submit Date:
2012-05-18
Status:
Closed
Updated Date:
2013-02-20
Project Name:
JDK
Resolved Date:
2012-07-24
Component:
core-libs
OS:
windows_7
Sub-Component:
java.lang
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
6u31
Fixed Versions:

Related Reports
Backport:
Backport:
Backport:
Backport:
Duplicate:
Relates:
Relates:
Relates:

Sub Tasks

Description
FULL PRODUCT VERSION :
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b05)
Java HotSpot(TM) Client VM (build 20.6-b01, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.2.8250]

A DESCRIPTION OF THE PROBLEM :
The JDK1.6.0 System.getProperty("os.name") doesn't get Windows 8's os.name correct. It should get "Windows 8" instead of "Windows NT (unknown)".

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the following code in Windows 8 Consumer Preview:

public class SystemPropertyTest {

	public static void main(String[] args) {
		System.out.println(System.getProperty("os.name"));
	}

}

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
System.getProperty("os.name") should return "Windows 8".
ACTUAL -
System.getProperty("os.name") returns "Windows NT (unknown)".

REPRODUCIBILITY :
This bug can be reproduced always.

                                    

Comments
EVALUATION

Windows 8 has not GA'ed yet but we need to be prepared.
                                     
2012-05-19
EVALUATION

Changeset: 0c3d9050c918
Author:    khazra
Date:      2012-05-23 10:41 -0700
URL:       http://hg.openjdk.java.net/jdk8/tl/jdk/rev/0c3d9050c918

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

! src/windows/native/java/lang/java_props_md.c
                                     
2012-05-23



Hardware and Software, Engineered to Work Together