I have stumbled across something truly puzzling regarding System.getProperty("os.name")
. According to a Java bug on the matter and the Java 5 release notes (search for "os.name"), there was a bug in Java with early "longhorn" versions of Vista that should have been fixed in v5 release 10.
However on my Vista SP1 box - using both v5 release 15 and v6 release 6 - System.getProperty("os.name")
returns "Windows XP". Further System.getProperty("os.version")
returns "5.1". I cannot find anything relating to this issue via Google though. This makes me wonder whether it is something odd with my Vista setup. I have tried calling the GetVersionEx() API function from a test C program and it returns major version 6, minor 0 (as I'd expect for a Vista install).
Has anyone else encountered this problem, know of a fix or have any suggestions of how I might work around it without using JNI?