Subject: java reporting of OS name
To: None <netbsd-help@netbsd.org>
From: None <brook@biology.nmsu.edu>
List: netbsd-help
Date: 07/17/2003 13:35:14
I am running a java program that reports the OS based on the following
code:
Properties prop = System.getProperties();
osName = prop.getProperty("os.name", "unknown_os_name");
osVersion = prop.getProperty("os.version", "unknown_os_version");
osArch = prop.getProperty("os.arch", "unknown_arch");
vmVersion = prop.getProperty("java.version", "unknown_java_version");
Although this is running on a NetBSD-1.6/i386 system the values are
reported as Linux, 2.4.18, i386, 1.3.1_08.
The JVM in use is from the following package:
sun-jre13-1.0.8nb1 Sun's Java(tm) Runtime Environment 1.3.1
Is it possible to make the System.getProperties() report values that
correspond to the correct system?
Cheers,
Brook