Package net.sf.freecol.common.util
Class OSUtils
- java.lang.Object
-
- net.sf.freecol.common.util.OSUtils
-
public class OSUtils extends java.lang.ObjectClass used to deal specifically with the operating system
-
-
Constructor Summary
Constructors Constructor Description OSUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static java.lang.String[]getBrowserExecString(java.lang.String url)What should we run to launch a browser?static java.lang.StringgetOperatingSystem()What OS are we using?static voidlaunchBrowser(java.lang.String url)Launches the web browser based on a given operating systemstatic booleanonMacOSX()Does the OS look like Mac OS X?static booleanonUnix()Does the OS look like some sort of unix?static booleanonWindows()Does the OS look like some sort of Windows?
-
-
-
Method Detail
-
getOperatingSystem
public static java.lang.String getOperatingSystem()
What OS are we using?- Returns:
- The operating system name.
-
onMacOSX
public static boolean onMacOSX()
Does the OS look like Mac OS X?- Returns:
- True if Mac OS X appears to be present.
-
onUnix
public static boolean onUnix()
Does the OS look like some sort of unix?- Returns:
- True we hope.
-
onWindows
public static boolean onWindows()
Does the OS look like some sort of Windows?- Returns:
- True if Windows appears to be present.
-
launchBrowser
public static final void launchBrowser(java.lang.String url)
Launches the web browser based on a given operating system- Parameters:
url- The URL to launch
-
getBrowserExecString
private static final java.lang.String[] getBrowserExecString(java.lang.String url)
What should we run to launch a browser?- Parameters:
url- The URL to launch- Returns:
- An OS-dependent array of commands to exec a browser.
- See Also:
launchBrowser(String)
-
-