Why is Java reporting XP in Vista?

I came across something really perplexing in regards System.getProperty("os.name"). According to the Java bug on this issue and the release notes for Java 5 (search for "os.name"), a bug appeared in Java with the early "long" versions of Vista that should have been fixed in version v5 version 10.

However, in my Vista SP1 window - using both versions of v5 version 15 and version 6 6 - System.getProperty("os.name")"Windows XP" returns. Next System.getProperty("os.version")returns "5.1". However, I can not find anything related to this problem through Google. This makes me wonder if something is strange with my Vista setup. I tried calling the GetVersionEx () API function from the C test program, and it returns major version 6, minor 0 (as I would expect to install Vista).

Has anyone else come across this problem, knew about a fix, or had any suggestions on how I can get around this without using JNI?

+5
source share
2 answers

, Java XP. Vista Windows, Java , XP. .

+10

Windows Windows 2000 5.0. Windows XP 5.1. Vista 6.0, . , Java .

, JNI, . , , , XP Vista.

0

All Articles