Class OSInfo
java.lang.Object
ca.phon.util.OSInfo
Utility class for determining host OS.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic OSInfo.OSTypeGet the host os type.static booleanisMacOs()Is the host os Mac OS?static booleanisNix()Is the host os *nix?static booleanIs the host os windows?
-
Field Details
-
OS_TYPE
Field containing the host OS type
-
-
Constructor Details
-
OSInfo
public OSInfo()
-
-
Method Details
-
getOSType
Get the host os type.- Returns:
- the host os type, or
OSType.OTHERis not detected
-
isMacOs
public static boolean isMacOs()Is the host os Mac OS?- Returns:
trueif system property 'mrj.version' is setfalseotherwise.
-
isWindows
public static boolean isWindows()Is the host os windows?- Returns:
trueif system property 'os.name' contains the string 'windows',falseotherwise
-
isNix
public static boolean isNix()Is the host os *nix?- Returns:
trueif system property 'os.name' contains the string 'nix' or 'nux',falseotherwise
-