JDK-7170169 : (props) System.getProperty("os.name") should return "Windows 8" when run on Windows 8
  • Type: Enhancement
  • Status: Closed
  • Resolution: Fixed
  • Component: core-libs
  • Sub-Component: java.lang
  • Priority: P3
  • Affected Version: 6u31
  • OS: windows_7
  • CPU: x86
  • Submit Date: 2012-05-18
  • Updated Date: 2013-02-20
  • Resolved Date: 2012-07-24
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 Availabitlity Release.

To download the current JDK release, click here.
Other JDK 6 JDK 7 JDK 8
1.4.2_41Fixed 6u38Fixed 7u6Fixed 8 b43Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
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 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

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