System.getProperty("os.name") Returns "Windows Server 2016" on Windows Server 2022
(Doc ID 2965321.1)
Last updated on AUGUST 03, 2023
Applies to:
Java SE JDK and JRE - Version 7 to 17Information in this document applies to any platform.
Symptoms
On Windows Server 2022, System.getProperty("os.name") incorrectly returns "Windows Server 2016". The application fails to run, and the following fatal error is seen in the application log:
The issue can be reproduced by running any program that uses getProperty("os.name") with any of the following Java SE versions and updates:
- JDK 17.0.1 and older JDK 17 releases
- JDK 11.0.13 and older JDK 11 releases
- JDK 8u311 and older JDK 8 releases
- JDK 7u321 and older JDK 7 releases
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Cause |
Solution |
References |