org.isam.perv.desktop
Class Launcher

java.lang.Object
  |
  +--org.isam.perv.desktop.Launcher

public class Launcher
extends java.lang.Object

Helper tool used to launch ISAM applications.

Version:
$Id: Launcher.java,v 1.19 2004/06/14 21:01:01 lucc Exp $
Author:
lucc

Field Summary
(package private) static int ERR_ARG_MISSING
          Exit code if a command-line argument is missing.
(package private) static int ERR_UNEXPECTED
          Exit code if an unexpected error occured.
(package private) static boolean NDEBUG
          Set to 'true' if debugging output should be generated.
(package private) static java.lang.String PROGRAM_NAME
          Program name displayed by the --help command-line option.
(package private) static java.lang.String USER_PROPS_FILE
          Name of the properties file that holds user-specific ISAM configurations.
 
Constructor Summary
Launcher()
           
 
Method Summary
static void launch(java.lang.String appDescUrl, java.lang.String inUrl, java.lang.String outUrl, java.lang.String errUrl, java.lang.String[] params)
          Launches the ISAM application defined by the launch descriptor pointed by appDescUrl, providing params as startup arguments.
static void main(java.lang.String[] args)
          Launcher entry-point for stand-alone operation mode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NDEBUG

static final boolean NDEBUG
Set to 'true' if debugging output should be generated.

See Also:
Constant Field Values

ERR_ARG_MISSING

static final int ERR_ARG_MISSING
Exit code if a command-line argument is missing.

See Also:
Constant Field Values

ERR_UNEXPECTED

static final int ERR_UNEXPECTED
Exit code if an unexpected error occured.

See Also:
Constant Field Values

PROGRAM_NAME

static final java.lang.String PROGRAM_NAME
Program name displayed by the --help command-line option.

See Also:
Constant Field Values

USER_PROPS_FILE

static final java.lang.String USER_PROPS_FILE
Name of the properties file that holds user-specific ISAM configurations.

See Also:
Constant Field Values
Constructor Detail

Launcher

public Launcher()
Method Detail

launch

public static final void launch(java.lang.String appDescUrl,
                                java.lang.String inUrl,
                                java.lang.String outUrl,
                                java.lang.String errUrl,
                                java.lang.String[] params)
                         throws java.lang.Exception
Launches the ISAM application defined by the launch descriptor pointed by appDescUrl, providing params as startup arguments. The standard streams in, out and err are redirected to inUrl, outUrl, and errUrl respectively.

Parameters:
appDescUrl - URL to a valid ISAM Application Launch Descriptor
inUrl - System.in redirection
outUrl - System.out redirection
errUrl - System.err redirection
params - Arguments to be passed to application's main method.
Throws:
java.lang.Exception - if an error occurs

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Launcher entry-point for stand-alone operation mode.

Parameters:
args - a String[] value
Throws:
java.lang.Exception - if an error occurs