ADDITIONAL SYSTEM INFORMATION :
JRE 1.8.0_331 running on Windows 11 Home, version 21H2, build 22000.652.
A DESCRIPTION OF THE PROBLEM :
Running JRE 1.8.0_331 when I call System.getProperty("os.name") call returns "Windows 11" which is correct since I am running on Windows 11. However, when I call System.getProperty("os.version") returns "10.0"!
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Execute the following Java code:
System.getProperty("os.name"); // Which will correctly return "Windows 11"
System.getProperty("os.version"); // Which will incorrectly return "10.0"!
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I expected System.getProperty("os.version") to return "11.0".
ACTUAL -
"10.0"
---------- BEGIN SOURCE ----------
See "Steps to reproduce"
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
One could query "os.name" and do some parsing and for each os but I believe the purpose of having these system properties is so programmers don't have to write such code.
FREQUENCY : always
JRE 1.8.0_331 running on Windows 11 Home, version 21H2, build 22000.652.
A DESCRIPTION OF THE PROBLEM :
Running JRE 1.8.0_331 when I call System.getProperty("os.name") call returns "Windows 11" which is correct since I am running on Windows 11. However, when I call System.getProperty("os.version") returns "10.0"!
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Execute the following Java code:
System.getProperty("os.name"); // Which will correctly return "Windows 11"
System.getProperty("os.version"); // Which will incorrectly return "10.0"!
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I expected System.getProperty("os.version") to return "11.0".
ACTUAL -
"10.0"
---------- BEGIN SOURCE ----------
See "Steps to reproduce"
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
One could query "os.name" and do some parsing and for each os but I believe the purpose of having these system properties is so programmers don't have to write such code.
FREQUENCY : always
- relates to
-
JDK-8254241 os.version for Windows will stay at 10.0 forever
-
- New
-