consciouscode.seedling.launcher
Class Launcher
java.lang.Object
consciouscode.util.Application
consciouscode.seedling.launcher.Launcher
public final class Launcher
- extends Application
The standard command-line entry point for stand-alone Seedling applications.
The launcher determines the complete list of modules that must be loaded,
then determines the appropriate classpath. It creates a custom
ClassLoader
that is then used to launch Seedling.
The intended use of this class is to invoke main(java.lang.String[])
from the JVM
startup sequence. The basic invocation is as follows:
java -jar launcher.jar OPTION ... module ...
This loads the specified module(s), along with any modules they require, and
launches a new Seedling root. Any optional arguments must precede the list
of modules.
In order for the launcher to locate and load modules, the Seedling home
directory must be specified. This directory is assumed to contain a
subdirectory named modules
that in turn contains available
modules.
The Seedling home is determined as follows:
- If the JVM system property
seedling.home
is
defined, it is used.
- Otherwise, if the environment variable
SEEDLING_HOME
is
defined, it is used.
- Otherwise, an error occurs.
While the Seedling home directory provides the core platform modules, it is
often desirable to load modules from other locations as well. The
--repositories
(or -r
) argument declares a search path of
such additional directories. This option can occur multiple times; each
occurrence appends more repositories to the end of the current search path.
Seedling can be run in debug mode by providing the command-line argument
--debug
(or -d
). This also causes the Seedling
RootNode
to log debugging messages, which can be
particularly helpful when diagnosing problems.
For direct programmatic control over the launch process, see
SeedlingBuilder
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Launcher
public Launcher()
main
public static void main(String[] args)
run
protected int run(String[] args)
throws IOException,
SeedlingException
- Specified by:
run
in class Application
- Returns:
- the application result, generally zero if the application is
exiting without error.
- Throws:
IOException
SeedlingException
Copyright © 2001–2012
Todd V. Jonker. All Rights Reserved.