|
Table of Contents
-
About the Launcher
-
The Launcher Descriptor (LD)
-
<launcher> Element
-
<include> Element
-
<run> Element
-
<option> Element
-
<classpath> Element
-
<path> Element
-
<arguments> Element
-
<argument> Element
-
<properties> Element
-
<property> Element
About the Launcher
The launcher is a tool developed by the OpenCCM project for
describing and supporting the execution of Java applications.
The configuration mechanism describes:
-
Compiled files (eg: jar, classes, ...).
-
Java properties.
-
The application main class full name.
-
Application parameters.
-
The mode of execution.
-
Additional contexts of execution.
This powerful tool allows us to:
-
Describe various scenario using a specific XML configuration
file independently of the target operating system.
-
Reference remote elements such as Jar file, launcher file
using URL formalism.
-
Override the standard Java Virtual Machine classes (eg:
rt.jar ).
-
Override the default Object Request Broker (ORB) provided
with the standard Java Development Kit.
-
Execute multiple applications in the same process.
-
Decrease the number of running Java Virtual Machines.
The Launcher Descriptor (LD)
The goal of this document is to provide information on the way to
use the Launcher Descriptor (LD) to describe launcher
configurations.
<launcher> Element
launcher |
Description | The launcher element is the root element of the
Launcher Descriptor.
|
XML DTD |
<!ELEMENT launcher (include|run|option|classpath|arguments|properties)*>
|
Parent | None. |
Attribute | None. |
Children Elements |
-
include :
The include element defines a
Launcher Descriptor to include.
-
run :
The run element defines a particular
application configuration.
-
option :
The option element describes
a particular context of execution.
-
classpath :
The classpath element defines a set
of paths where classes are stored.
-
arguments :
The arguments element defines a set
of arguments to pass to the main method of an
application to run.
-
properties :
The properties element defines a set
of Java properties which will be available in
the application through the
System.getProperties() method.
|
Example |
<launcher>
<include> ... </include>
<run> ... </run>
<classpath> ... </classpath>
<arguments> ... </arguments>
<properties> ... </properties>
<option> ... </option>
<classpath> ... </classpath>
<properties> ... </properties>
<option> ... </option>
<arguments> ... </arguments>
<classpath> ... </classpath>
</launcher>
|
<include> Element
include |
Description |
The include element describes an external Launcher
Descriptor configuration to include in the current configuration.
|
XML DTD |
<!ELEMENT include EMPTY >
<!ATTLIST include url CDATA #REQUIRED >
|
Parent |
launcher .
|
Attribute |
|
Child Element | None. |
Examples |
<include url="file:launcher/OpenCCM.xml" />
<include url="http://www.server.org/launcher/OpenCCM.xml" />
<!-- this line include configuration files stored in the launcher/ directory -->
<include url="file:launcher/" />
|
<run> Element
run |
Description |
The run element describes a standalone
configuration for running an application.
|
XML DTD |
<!ELEMENT run EMPTY >
<!ATTLIST run
id
ID #REQUIRED
mainclassname
CDATA #REQUIRED
mode
( normal | thread | daemon ) "thread"
classpath
IDREFS #IMPLIED
arguments
IDREFS #IMPLIED
properties
IDREFS #IMPLIED
>
|
Parent |
launcher .
|
Attributes |
-
id ID :
The identifier of the run element. Default run identifier
is default .
-
mainclassname CDATA :
The full name of the application main class.
-
mode CDATA :
The mode of execution for the platform. Available
values are normal ,
thread or daemon .
Default value is thread :
-
normal value results in a sequential
execution of run elements when they
are launched together.
-
thread value results in a concurrent
execution of run elements when they are
launched together.
-
daemon is equivalent to
thread but the Java Virtual Machine
exits when all runs (except daemon runs)
exits.
-
classpath IDREFS :
Identifiers of the classpath
to use with the application. Multiple
classpath could be specified using
space separators.
-
arguments IDREFS :
Identifiers of the arguments
to use with the application. Multiple
arguments could be specified using
space separators.
-
properties IDREFS :
Identifiers of the properties
to use with the application. Multiple
properties could be specified using
space separators.
|
Child Element | None. |
Example |
<run id="default"
mainclassname="MyPackage.MyApplicationName"
classpath="MyClasspath1 MyClasspath2"
properties="MyProperties1 MyProperties2"
arguments="MyArguments1 MyArguments2"
/>
|
<option> Element
option |
Description |
The option element describes an execution context environment
for a run .
|
XML DTD |
<!ELEMENT option EMPTY >
<!ATTLIST option
id
ID #REQUIRED
classpath
IDREFS #IMPLIED
arguments
IDREFS #IMPLIED
properties
IDREFS #IMPLIED
>
|
Parent |
launcher .
|
Attributes |
-
id CDATA :
The identifier of the option.
-
classpath IDREFS :
Identifiers of the classpath
to use with the context.
Multiple classpath could be specified using
space separators.
-
arguments IDREFS :
Identifiers of the arguments
to use with the context.
Multiple arguments could be specified using
space separators.
-
properties IDREFS :
Identifiers of the properties
to use with the context.
Multiple properties could be specified using
space separators.
|
Child Element | None. |
Example |
<option id="MyOption"
classpath="MyClasspath3 MyClasspath4"
properties="MyProperties3 MyProperties4"
arguments="MyArguments3 MyArguments4"
/>
|
<classpath> Element
classpath |
Description |
The classpath element describes the content
of the classpath variable of the Java Virtual Machine
(JVM) which would be launched.
|
XML DTD |
<!ELEMENT classpath (path)* >
<!ATTLIST classpath
id ID #REQUIRED
>
|
Parent |
launcher .
|
Attribute |
|
Child Element |
|
Example |
<classpath id="MyClasspath" >
<path ... />
<path ... />
</classpath>
|
<path> Element
path |
Description |
The path element describes a reference to a
particular resource which could be a directory or a
Java archive (jar).
|
XML DTD |
<!ELEMENT path EMPTY >
<!ATTLIST path
url
CDATA #IMPLIED
classpath
IDREF #IMPLIED
>
|
Parent |
classpath .
|
Attribute |
|
Child Element | None. |
Examples |
<path url="file:lib/MyArchive.jar" />
<!-- this line include compiled files stored in the lib/ directory -->
<path url="http://www.server.org/lib/" />
<path classpath="MyClasspath" />
|
<arguments> Element
arguments |
Description |
The arguments element describes a set of
command line argument values for your application.
|
XML DTD |
<!ELEMENT arguments (argument)* >
<!ATTLIST arguments
id ID #REQUIRED
>
|
Parent |
launcher .
|
Attribute |
|
Child Element |
|
Example |
<arguments id="MyArguments" >
<argument ... />
<argument ... />
</arguments>
|
<argument> Element
argument |
Description |
The argument element describes an argument value.
|
XML DTD |
<!ELEMENT argument EMPTY >
<!ATTLIST argument
value
CDATA #IMPLIED
line
CDATA #IMPLIED
arguments
IDREF #IMPLIED
>
|
Parent |
arguments .
|
Attributes |
-
value CDATA :
The value of the argument.
Warning: An argument value is considered
as one argument even if the value contains spaces.
-
line CDATA :
A line argument.
Warning: An argument line is considered
as a list of arguments separated by spaces.
-
arguments IDREF :
The reference to an existing
arguments definition.
|
Child Element | None. |
Examples |
<argument value="MyArgument" />
<argument value="MyArgument1 MyArgument2" />
<-- this argument is different from the above one -->
<argument line="MyArgument1 MyArgument2" />
<argument arguments="MyArguments" />
|
<properties> Element
properties |
Description |
The properties element defines a set of Java properties.
|
XML DTD |
<!ELEMENT properties (property)* >
<!ATTLIST properties
id ID #REQUIRED
>
|
Parent |
launcher .
|
Attribute |
|
Child Element |
|
Example |
<properties id="MyProperties" >
<property ... />
<property ... />
</properties>
|
<property> Element
property |
Description |
The property element defines a particular
property entry.
|
XML DTD |
<!ELEMENT property EMPTY >
<!ATTLIST property
name
CDATA #IMPLIED
value
CDATA #IMPLIED
properties IDREF #IMPLIED
>
|
Parent |
properties .
|
Attributes |
-
name CDATA :
The identifier of the property .
-
value CDATA :
The value of the property .
-
properties IDREF :
The reference to an existing
properties definition.
|
Child Element | None. |
Examples |
<property name="MyProperty" />
<property name="MyIdentifier" value="MyValue" />
<property properties="MyProperties" />
|
|