United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6819886 System.getProperty("os.name") reports Vista on Windows 7
JDK-6819886 : System.getProperty("os.name") reports Vista on Windows 7

Details
Type:
Bug
Submit Date:
2009-03-19
Status:
Resolved
Updated Date:
2010-05-08
Project Name:
JDK
Resolved Date:
2009-04-11
Component:
core-libs
OS:
windows_vista
Sub-Component:
java.lang
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
6u14
Fixed Versions:

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

Sub Tasks

Description
FULL PRODUCT VERSION :
java version "1.6.0_14-ea"
Java(TM) SE Runtime Environment (build 1.6.0_14-ea-b03)
Java HotSpot(TM) Client VM (build 14.0-b12, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows 7 Ultimate x64, build 7057


A DESCRIPTION OF THE PROBLEM :
The name of the operating system is reported by System.getProperty ("os.version") as "Windows Vista" but it must be "Windows 7".

The same bug can be seen in recent builds of JDK 5.0 and JDK 6.0.



STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :


EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
OS = Windows 7
ACTUAL -
OS = Windows Vista

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
class OSVersion {
    public static void main(String[] args) {
        System.out.println ("OS =" + System.getProperty ("os.name"));
    }
}
---------- END SOURCE ----------

                                    

Comments
EVALUATION

Need to examine minor version to distinguish Vista from Windows 7 (ie: 6.0 = Vista, 6.1 = Windows 7).
                                     
2009-03-20
SUGGESTED FIX

http://cr.openjdk.java.net/~alanb/6819886/webrev.00/
                                     
2009-03-20



Hardware and Software, Engineered to Work Together