DbtuTools project
Java Library

org.edelbyte.util
Class System

java.lang.Object
  |
  +--org.edelbyte.util.System

public class System
extends java.lang.Object

The System class provides operating system related stuff. It cannot be instantiated.

Author:
Daniel Scheibli <daniel.scheibli at edelbyte.org>

Field Summary
static int OS_FAMILY_UNIX
          Constant standing for the Unix operating systems, like IBM's AIX, Linux, Sun Solaris and others.
static int OS_FAMILY_WINTEL
          Constant standing for all DOS succession operating systems, like the Microsoft Windows family and IBM's OS/2.
 
Method Summary
static int getOsFamily()
          Detects and returns the operating system family.

Background: The detection is done by interpreting the value of java.lang.System.getProperty("os.name");
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OS_FAMILY_WINTEL

public static final int OS_FAMILY_WINTEL
Constant standing for all DOS succession operating systems, like the Microsoft Windows family and IBM's OS/2.

OS_FAMILY_UNIX

public static final int OS_FAMILY_UNIX
Constant standing for the Unix operating systems, like IBM's AIX, Linux, Sun Solaris and others.
Method Detail

getOsFamily

public static int getOsFamily()
                       throws UnknownValueException
Detects and returns the operating system family.

Background: The detection is done by interpreting the value of java.lang.System.getProperty("os.name");
Returns:
OS_FAMILY_UNIX - For the case, that a Unix family operating system was detected.
OS_FAMILY_WINTEL - For the case, that a Wintel family operating system was detected.
Throws:
UnknownValueException - For the case, that the operating system family could not be detected.

DbtuTools project
Java Library