| Main start class. This class is intended to be the main class listed in the MANIFEST.MF of the
start.jar archive. It allows an application to be started with the command "java -jar
start.jar". The behaviour of Main is controlled by the "org/mortbay/start/start.config" file
obtained as a resource or file. This can be overridden with the START system property. The
format of each line in this file is:
SUBJECT [ [!] CONDITION [AND|OR] ]*
where SUBJECT:
ends with ".class" is the Main class to run.
ends with ".xml" is a configuration file for the command line
ends with "/" is a directory from which add all jar and zip files from.
ends with "/*" is a directory from which add all unconsidered jar and zip files from.
Containing = are used to assign system properties.
all other subjects are treated as files to be added to the classpath.
Subjects may include system properties with $(propertyname) syntax. File subjects starting with
"/" are considered absolute, all others are relative to the home directory.
CONDITION is one of:
always
never
available package.class
java OPERATOR n.n
nargs OPERATOR n
OPERATOR := one of "<",">"," <=",">=","==","!="
CONTITIONS can be combined with AND OR or !, with AND being the assume operator for a list of
CONDITIONS. Classpath operations are evaluated on the fly, so once a class or jar is added to
the classpath, subsequent available conditions will see that class. The system parameter
CLASSPATH, if set is given to the start classloader before any paths from the configuration
file. Programs started with start.jar may be stopped with the stop.jar, which connects via a
local port to stop the server. The default port can be set with the STOP.PORT system property (a
port of < 0 disables the stop mechanism). If the STOP.KEY system property is set, then a random
key is generated and written to stdout. This key must be passed to the stop.jar.
author: Jan Hlavaty (hlavac@code.cz) author: Greg Wilkins |