public boolean isNative() {
return true;
}
public OperatingSystemType getOperatingSystemType() {
OperatingSystem os = OperatingSystem.getInstance();
if (OperatingSystem.NAME_LINUX.equals(os.getName())) {
return OperatingSystemType.LINUX;
}
if (OperatingSystem.NAME_SOLARIS.equals(os.getName())) {
return OperatingSystemType.SOLARIS;
}
if (OperatingSystem.NAME_WIN32.equals(os.getName())) {
return OperatingSystemType.WINDOWS;
}
if (OperatingSystem.NAME_HPUX.equals(os.getName())) {
return OperatingSystemType.HPUX;
}
if (OperatingSystem.NAME_AIX.equals(os.getName())) {
return OperatingSystemType.AIX;
}
if (OperatingSystem.NAME_MACOSX.equals(os.getName())) {
return OperatingSystemType.OSX;
}
if (OperatingSystem.NAME_FREEBSD.equals(os.getName())) {
return OperatingSystemType.BSD;
}
log.warn("Could not parse operating system name from " + os.getName() + ", returning Java platform");
return OperatingSystemType.JAVA;
}