JDK-8020191 : System.getProperty( " os.name " ) returns " Windows NT (unknown) " on Windows 8.1
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 7u45,8
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_8
  • Submitted: 2013-07-08
  • Updated: 2017-07-21
  • Resolved: 2013-08-02
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 Other JDK 6 JDK 7 JDK 8
5.0u65Fixed 5.0u71Fixed 6u75Fixed 7u55Fixed 8 b103Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
FULL PRODUCT VERSION :


ADDITIONAL OS VERSION INFORMATION :
Windows 8.1
Windows Server 2012 R2

A DESCRIPTION OF THE PROBLEM :
System.getProperty( " os.name " ) returns  " Windows NT (unknown) "  on Windows 8.1 and Windows Server 2012 R2

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Following code should return valid OS name for Windows 8.1

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

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Valid OS name
ACTUAL -
 " Windows NT (unknown) " 

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
public class HelloWorld {
     public static void main(String args[]) {
        System.out.println(System.getProperty( " os.name " ));
     }
}
---------- END SOURCE ----------
Comments
SQE OK to take the fix into CPU14_02
15-02-2014

SQE is ok to take the fix in 7u60.
21-01-2014

No Win8.1 host to verify
13-09-2013

Ok. Now I see.
07-08-2013

Sorry typo on the original post. Got Windows 8, not windows 8.1 The screenshot should have clarified this. The point is that it didn't return "unknown" but a reasonable answer.
06-08-2013

At Bernard's request I tried to reproduce on my Surface Pro. Ran: public static void main(String[] args) { System.out.println(System.getProperty("os.name")); } On a Windows Machine with 8.1 EA and got 8 as the answer. Using 7u40 build 37, 32 bit for Windows. Attached screen shots of the system properties window.
06-08-2013

1. We are working with Windows 8.1 Preview release. The situation is changing permanently. When we are speaking about build, we mean both Windows8.1 and Java builds. In my screenshot we have 9431 + jdk8/tl. 2. Bernard has not got a chance to get the string "Windows 8.1" as OS version from Jdk40, sorry. No way. Only from script command "ver".
06-08-2013

I was using 7u40 build 37.
06-08-2013

The changes to report "Windows 8.1" are in JDK 8 (at least in jdk8/tl). I don't know which build Aurelio used but it might be better to check 7u40 (which doesn't have the changes).
06-08-2013

Non-official MS OS release. MS does not presented official name for new OS.
10-07-2013

I've set the fixVersion to 8 for now (on the assumption that the JDK will be supported on Windows 8.1 once it is release). Backport issues for 7u and older releases can be created when the full support matrix for shipping releases is clear.
09-07-2013