org.mortbay.start
Class Main

java.lang.Object
  extended by org.mortbay.start.Main

public class Main
extends Object

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 ([email protected]), Greg Wilkins

Constructor Summary
Main()
           
 
Method Summary
 void init(String[] args)
           
 void invokeMain(ClassLoader classloader, String classname, String[] args)
           
static void main(String[] args)
           
 void start()
           
 void start(String[] args)
           
 void stop()
          Stop a running jetty instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Main

public Main()
Method Detail

main

public static void main(String[] args)

invokeMain

public void invokeMain(ClassLoader classloader,
                       String classname,
                       String[] args)
                throws IllegalAccessException,
                       InvocationTargetException,
                       NoSuchMethodException,
                       ClassNotFoundException
Throws:
IllegalAccessException
InvocationTargetException
NoSuchMethodException
ClassNotFoundException

start

public void start(String[] args)

init

public void init(String[] args)

start

public void start()

stop

public void stop()
Stop a running jetty instance.



Copyright © 1995-2009 Mort Bay Consulting. All Rights Reserved.