JDK-8020191 : System.getProperty( " os.name " ) returns " Windows NT (unknown) " on Windows 8.1
  • Type: Bug
  • Status: Closed
  • Resolution: Fixed
  • Component: core-libs
  • Sub-Component: java.lang
  • Priority: P3
  • Affected Version: 7u45,8
  • OS: windows_8
  • Submit Date: 2013-07-08
  • Updated Date: 2017-07-21
  • Resolved Date: 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 Availabitlity Release.

To download the current JDK release, click here.
Other JDK 6 JDK 7 JDK 8
5.0u65Fixed 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
2014-02-15

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

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

Ok. Now I see.
2013-08-07

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.
2013-08-06

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".
2013-08-06

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

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).
2013-08-05

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.
2013-08-05

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

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.
2013-07-09