From: ilya on
I use the method System.getProperty("os.name") to get the name of
operation system. For the most computers it works fine. But on some
computers it is installed windows 7, but this method shows that the
operation system is windows vista. What can be the reason?
From: Mike Schilling on
ilya wrote:
> I use the method System.getProperty("os.name") to get the name of
> operation system. For the most computers it works fine. But on some
> computers it is installed windows 7, but this method shows that the
> operation system is windows vista. What can be the reason?

Most likely that that version of Java doesn't know about Windows 7, so it
interprets any version number higher than XP's as Vista.


From: ilya on
Ok. thank you. I found out that it is necessary to update the JDK.
From: Peyman on

i'm not sure but i think that win7 may not be the Released version of
Win7.
it may be a Beta or RC version
From: Lew on
ilya wrote:
>> I use the method System.getProperty("os.name") to get the name of
>> operation system. For the most computers it works fine. But on some
>> computers it is installed windows 7, but this method shows that the
>> operation system is windows vista. What can be the reason?
>

Could it be that the JVM simply asks the OS what it is, and that is
what Windows tells it?

Mike Schilling wrote:
> Most likely that that version of Java doesn't know about Windows 7, so it
> interprets any version number higher than XP's as Vista.
>

Are you claiming that the JVM hard-codes its knowledge of OSes rather
than querying the OS itself?

--
Lew