Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mortbay.start
Class Main

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

    public class Main

extends java.lang.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 (hlavac@code.cz), Greg Wilkins

Constructor Summary
`Main()`

Method Summary
`void` | `init(java.lang.String[] args)`
`void` | `invokeMain(java.lang.ClassLoader classloader, java.lang.String classname, java.lang.String[] args)`
`static void` | `main(java.lang.String[] args)`
`void` | `start()`
`void` | `start(java.lang.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(java.lang.String[] args)

### invokeMain

    public void invokeMain(java.lang.ClassLoader classloader,
                           java.lang.String classname,
                           java.lang.String[] args)
                    throws java.lang.IllegalAccessException,
                           java.lang.reflect.InvocationTargetException,
                           java.lang.NoSuchMethodException,
                           java.lang.ClassNotFoundException

  Throws:
    `java.lang.IllegalAccessException`
    `java.lang.reflect.InvocationTargetException`
    `java.lang.NoSuchMethodException`
    `java.lang.ClassNotFoundException`

### start

    public void start(java.lang.String[] args)

### init

    public void init(java.lang.String[] args)

### start

    public void start()

### stop

    public void stop()

  Stop a running jetty instance.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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