public final class OsVersion extends Object implements OsVersionConstants, StringConstants
Modifier and Type | Field and Description |
---|---|
static boolean |
IS_AIX
True if this is AIX.
|
static boolean |
IS_DEBIAN_LINUX
True if Debian Linux or derived was detected
|
static boolean |
IS_FEDORA_LINUX
True if Fedora Linux was detected
|
static boolean |
IS_FREEBSD
True if this is FreeBSD.
|
static boolean |
IS_HPUX
True if this is HP-UX.
|
static boolean |
IS_LINUX
True if this is Linux.
|
static boolean |
IS_MAC
True is this is Mac OS
|
static boolean |
IS_MANDRAKE_LINUX
True if Mandriva(Mandrake) Linux was detected
|
static boolean |
IS_MANDRIVA_LINUX
True if Mandrake/Mandriva Linux was detected
|
static boolean |
IS_OS2
True if this is OS/2.
|
static boolean |
IS_OSX
True if this is the Mac OS X.
|
static boolean |
IS_REDHAT_LINUX
True if RedHat Linux was detected
|
static boolean |
IS_SUNOS
True if this is SunOS.
|
static boolean |
IS_SUSE_LINUX
True if SuSE Linux was detected
|
static boolean |
IS_UNIX
True if this is some variant of Unix (OSX, Linux, Solaris, FreeBSD, etc).
|
static boolean |
IS_WINDOWS
True if this is Windows.
|
static String |
OS_NAME
OS_NAME = System.getProperty( "os.name" )
|
AIX, DEBIAN, FEDORA, FREEBSD, HP_UX, LINUX, MAC, MACOSX, MANDRAKE, MANDRIVA, OS_2, OSNAME, PROC_VERSION, RED_HAT, REDHAT, SUNOS, SUSE, WINDOWS
NL, SP
Constructor and Description |
---|
OsVersion() |
Modifier and Type | Method and Description |
---|---|
private static String |
getLinuxDistribution()
Gets the Details of a Linux Distribution
|
static String |
getOsDetails()
returns a String which contains details of known OSs
|
private static String |
getReleaseFileName()
Gets the etc Release Filename
|
static void |
main(String[] args)
Testmain
|
public static final boolean IS_FREEBSD
public static final boolean IS_LINUX
public static final boolean IS_HPUX
public static final boolean IS_AIX
public static final boolean IS_SUNOS
public static final boolean IS_OS2
public static final boolean IS_MAC
public static final boolean IS_OSX
public static final boolean IS_WINDOWS
public static final boolean IS_UNIX
public static final boolean IS_REDHAT_LINUX
public static final boolean IS_FEDORA_LINUX
public static final boolean IS_MANDRAKE_LINUX
public static final boolean IS_MANDRIVA_LINUX
public static final boolean IS_SUSE_LINUX
public static final boolean IS_DEBIAN_LINUX
public OsVersion()
private static String getReleaseFileName()
private static String getLinuxDistribution()
public static String getOsDetails()
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses