JDK-8223294 : Update OS detection code to recognize Windows Server 2019
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 11.0.3-oracle,12
  • Priority: P3
  • Status: Resolved
  • Resolution: Not an Issue
  • OS: windows
  • CPU: x86_64
  • Submitted: 2019-05-03
  • Updated: 2019-08-15
  • Resolved: 2019-05-15
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.
JDK 13
13Resolved
Related Reports
Duplicate :  
Relates :  
Description
ADDITIONAL SYSTEM INFORMATION :
Windows Server 2019

A DESCRIPTION OF THE PROBLEM :
Java does not recognize Windows Server 2019 is currently recognized as "Windows Server 2016" which is put into the os name system property.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
System.out.println("os.name") prints Windows Server 2016 for 2019 version

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Windows Server 2019
ACTUAL -
Windows Server 2016

FREQUENCY : always



Comments
The os.name property is displaying "Windows Server 2016" because the user is running a preview release of Windows Server 2019. Once the user upgrades to the generally available release of Windows Server 2019, the os.name property will then display "Windows Server 2019".
15-05-2019

The user's JDK-12 windows screen shot contains the following line: Microsoft Windows [Version 10.0.17713.1000] Meaning, they are running Windows build 17713, which is a preview version. The generally available build version of WIndows Server 2019 is 17763. See https://en.wikipedia.org/wiki/Windows_Server_2019#Version_history and https://techcommunity.microsoft.com/t5/Windows-Server-Insiders/Windows-Server-2019-version-info/td-p/234472 Currently, the jdk recognizes builds 17763 and higher as Windows Server 2019. Do we want the os.name property to recognize Windows Server 2019 preview and test builds?
15-05-2019

For Windows, the property gets set in java.base/windows/native/libjava/java_props_md.c in function GetJavaProperties(). Hotspot has similiar code in src/os/windows/os_windows.cpp in function os::win32::print_windows_version().
15-05-2019

Does the value of this property come from HotSpot?
14-05-2019

From submitter: I tried in JDK 11 and 12 both. In windows server 2019 machine but it didn���t work. PFA the related screenshots and code I am running.
08-05-2019

The fix is already backported to JDK 11.0.3 , so it should not have been the affected version. Sent an email to submitter to confirm which version did he observe the issue in. Marking the issue as incomplete until receive additional details.
03-05-2019