Java’s “os.name” for Windows 10?

This is a known problem JDK-8066504 that has been fixed in upcoming Java 8 update 60.

The reason is GetVersionEx function has changed its behavior since Windows 8.1.

There are multiple possible workarounds, see MSDN article.

The trivial one is to exec cmd.exe /c ver.

The other is to look at the version information of one of the system files, e.g. kernel32.dll.

Leave a Comment