This class is used by
$COUGAAR_INSTALL_PATH/bin/cougaar[.bat]
to read the configuration XML files and print the java
command line, which is then used to launch the Cougaar node
process.
For usage, see the
CommandLine.USAGE string, or run:
$COUGAAR_INSTALL_PATH/bin/cougaar --help
The typical usage is:
# start node X specified in "mySociety.xml":
cd your_config_directory
$COUGAAR_INSTALL_PATH/bin/cougaar mySociety.xml X
This class is intended to replace the old Cougaar scripts:
Node, Node.bat, XMLNode.bat, XSLNode, XSLNode.bat
The behavior is backwards-compatible with XSLNode.
For example, the input files and command line:
mySociety.xml:
<?xml version='1.0'?>
<society name='MinPing' ..>
<node name='NodeA'>
<vm_parameter>-Dx=y</vm_parameter>
<vm_parameter>-Dfoo=$bar</vm_parameter>
</node>
</society>
myRuntime.xml:
<?xml version='1.0'?>
<vm_parameters>
<vm_parameter>-Dx=z</vm_parameter>
..
</vm_parameters>
command line:
$COUGAAR_INSTALL_PATH/bin/cougaar \
--society mySociety.xml\
--runtime myRuntime.xml\
NodeA
would print a command line output similar to:
java -Dx=z -Dfoo=$bar ...
and on Windows (based on the 'os.name' property) this would be:
java -Dx=z -Dfoo=%bar% ...
This parser also adds several standard Cougaar defaults, which
add the minimal -Ds and options required to run a Cougaar node:
- If the <command> is not specified in either the
society_xml or optional runtime_xml, "java" is used.
- If the <class> is not specified in either xml,
"org.cougaar.bootstrap.Bootstrapper" is used.
|