Class LauncherBootstrap

java.lang.Object
  extended by LauncherBootstrap

public class LauncherBootstrap
extends java.lang.Object

This class is used as a wrapper for loading the org.apache.commons.launcher.Launcher class and invoking its main(String[]) method. This particular class is primary used by the Windows 95, 98, ME, and 2000 platforms to overcome the difficulty of putting a jar file directly into the JVM's classpath when using batch scripts on these platforms.

Specifically, the problem on thse platforms is when Windows uses the PATH environment variable to find and run a batch script, %0 will resolve incorrectly in that batch script.

The way to work around this Windows limitation is to do the following:

  1. Put this class' class file - LauncherBootstrap.class - in the same directory as the batch script. Do not put this class file in a jar file.
  2. Put the jar file containing the launcher's classes in the same directory as the batch script and this class' class file. Be sure that that the jar file is named "commons-launcher.jar".
  3. Make the Java command in the batch script invoke Java use the following classpath arguments. Be sure to include the quotes to ensure that paths containing spaces are handled properly: -classpath %0\..;"%PATH%"

Author:
Patrick Luby

Field Summary
static java.lang.String ANT_CLASSPATH_PROP_NAME
          Ant classpath property name
static java.lang.String LAUNCHER_JAR_FILE_NAME
          Jar file name
static java.lang.String LAUNCHER_MAIN_CLASS_NAME
          Class name to load
static java.lang.String LAUNCHER_PROPS_FILE_NAME
          Properties file name
 
Constructor Summary
LauncherBootstrap()
           
 
Method Summary
static void main(java.lang.String[] args)
          The main method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANT_CLASSPATH_PROP_NAME

public static final java.lang.String ANT_CLASSPATH_PROP_NAME
Ant classpath property name

See Also:
Constant Field Values

LAUNCHER_JAR_FILE_NAME

public static final java.lang.String LAUNCHER_JAR_FILE_NAME
Jar file name

See Also:
Constant Field Values

LAUNCHER_PROPS_FILE_NAME

public static final java.lang.String LAUNCHER_PROPS_FILE_NAME
Properties file name

See Also:
Constant Field Values

LAUNCHER_MAIN_CLASS_NAME

public static final java.lang.String LAUNCHER_MAIN_CLASS_NAME
Class name to load

See Also:
Constant Field Values
Constructor Detail

LauncherBootstrap

public LauncherBootstrap()
Method Detail

main

public static void main(java.lang.String[] args)
The main method.

Parameters:
args - command line arguments


Copyright © 2002-2011 Apache Software Foundation. All Rights Reserved.