net.charlesames.utility.launch
Class LaunchMethods

java.lang.Object
  extended by net.charlesames.utility.launch.LaunchMethods

public abstract class LaunchMethods
extends java.lang.Object

Methods to launch an application

Author:
Charles Ames

Constructor Summary
LaunchMethods()
           
 
Method Summary
static void configureMac(java.lang.String applicationName)
          Configures application to use shared menu bar if running under Apple Macintosh OS.
static java.lang.String getArg(java.lang.String indicator)
          Looks for a command-line argument containing the indicator and returns the next argument.
static java.lang.String[] getArgs()
           
static boolean getFlag(java.lang.String indicator)
           
static java.lang.String getInstallDir()
           
static boolean isMacOS()
           
static void setArgs(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LaunchMethods

public LaunchMethods()
Method Detail

getInstallDir

public static java.lang.String getInstallDir()
Returns:
The path to the directory that holds the application file.

isMacOS

public static boolean isMacOS()
Returns:
True if the application is running under Apple Macintosh OS; false otherwise.

configureMac

public static void configureMac(java.lang.String applicationName)
Configures application to use shared menu bar if running under Apple Macintosh OS.

Parameters:
applicationName - The application name.

getArgs

public static java.lang.String[] getArgs()
Returns:
Array of command-line arguments.

setArgs

public static void setArgs(java.lang.String[] args)
Parameters:
args - Array of command-line arguments.

getFlag

public static boolean getFlag(java.lang.String indicator)
Parameters:
indicator - A string with no whitespace (e.g. -verbose).
Returns:
True if the indicator string is found in a command line argument; false otherwise.

getArg

public static java.lang.String getArg(java.lang.String indicator)
Looks for a command-line argument containing the indicator and returns the next argument.

Parameters:
indicator - A string with no whitespace (e.g. -input).
Returns:
The command line argument following the indicator (null if not found).