United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-8020191 : System.getProperty( " os.name " ) returns " Windows NT (unknown) " on Windows 8.1

Details
Type:
Bug
Submit Date:
2013-07-08
Status:
Closed
Updated Date:
2014-09-04
Project Name:
JDK
Resolved Date:
2013-08-02
Component:
core-libs
OS:
windows_8
Sub-Component:
java.lang
CPU:
Priority:
P3
Resolution:
Fixed
Affected Versions:
7u45,8
Fixed Versions:

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

Sub Tasks

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
URL:   http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/40221b09812f
User:  lana
Date:  2013-08-13 18:14:45 +0000

                                     
2013-08-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
I was using 7u40 build 37.  
                                     
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
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
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
URL:   http://hg.openjdk.java.net/jdk8/tl/jdk/rev/40221b09812f
User:  uta
Date:  2013-08-02 09:21:54 +0000

                                     
2013-08-02
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



Hardware and Software, Engineered to Work Together