Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java's system properties returning "Windows 8.1" after upgrade to "Windows 10"

My upgrade to Windows 10 went very well and only needing a few programs reinstalled. Java was one of those because Eclipse did not start anymore: eclipse 64 bit didn't run but 32 bit did and I am on a 64 bit machine where it used to work. This was easily fixed by uninstalling and reinstalling Java and the JDK. However, one issue still remains.

System.getProperty(" ... ") returns next wrong values:

  • "os.name" = "Windows 8.1" should say "Windows 10"
  • "os.version" = "6.3" is this wrong also?

Is this a problem with Java or is this because Windows 10 was done through a system-update and my system is technically still "Windows 8.1"?

like image 607
Matthew Wright Avatar asked Aug 09 '15 14:08

Matthew Wright


1 Answers

It's a problem with current Java.

MS changed some API behavior in Windows 10 and Java doesn't recognise it correctly. See https://bugs.openjdk.java.net/browse/JDK-8059803 for details.

This will be fixed in upcoming jdk8u60. Latest dev version reports next on Windows 10:

os.name = Windows 10
os.version = 10.0
like image 161
Sergey Grinev Avatar answered Nov 08 '22 13:11

Sergey Grinev