JDK-6819886 : System.getProperty("os.name") reports Vista on Windows 7
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 6u14
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_vista
  • CPU: generic
  • Submitted: 2009-03-19
  • Updated: 2010-05-08
  • Resolved: 2009-04-11
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 JDK 6 JDK 7 Other
1.4.2_21,OpenJDK6Fixed 6u14Fixed 7 b55Fixed OpenJDK6Fixed
Related Reports
Relates :  
Relates :  
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).
20-03-2009

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