In order to execute
LTDTool, the user's environment must first be configured appropriately. This section describes how to setup the user environment on UNIX-based and Windows machines. In addition to reassembling the command-line examples into a single line as mentioned above, the commands for setting environment variables must not contain space or line continutation characters in the value for the variable.
This section details the environment setup for UNIX-based machines providing four different methods:
-
Specify the Shell Script on the Command-Line
-
Set the CLASSPATH Environment Variable
-
Specify the CLASSPATH on the Command-Line
-
Specify the Jar on the Command-Line
Specify the Shell Script on the Command-Line
The preferred method is to specify the shell script,
LTDTool
, on the command-line. Setting the
PATH
environment variable to the location of this script, enables the shell script to be executed from any directory location on the user's machine.
The following command demonstrates how to set the
PATH
environment variable, by appending to its current setting.
[node:~] setenv PATH ${PATH}:\
$HOME/ltdtool-1.0.0/bin
The tool can now be executed via the shell script as demonstrated in the following example:
[node:~] LTDTool <command-line arguments>
Set the CLASSPATH Environment Variable
An alternative method is to set the
CLASSPATH
environment variable. The following commands demonstrate how to set this variable, by appending to its current setting.
The first example and preferred method for setting the variable, appends t
he executable jar file found in the
bin
directory:
[node:~] setenv CLASSPATH ${CLASSPATH}:\
$HOME/ltdtool-1.0.0/bin/ltdtool-1.0.0-app.jar
[node:~] echo $CLASSPATH
The second example separately appends the dependent jar files, found in the
lib
directory:
[node:~] setenv CLASSPATH ${CLASSPATH}:\
$HOME/ltdtool-1.0.0/lib/antlr-2.7.6.jar:\
$HOME/ltdtool-1.0.0/lib/commons-cli-1.0.jar:\
$HOME/ltdtool-1.0.0/lib/commons-collections-3.1.jar:\
$HOME/ltdtool-1.0.0/lib/commons-configuration-1.2.jar:\
$HOME/ltdtool-1.0.0/lib/commons-io-1.2.jar:\
$HOME/ltdtool-1.0.0/lib/commons-lang-2.1.jar:\
$HOME/ltdtool-1.0.0/lib/commons-logging-1.0.3.jar:\
$HOME/ltdtool-1.0.0/lib/product-tools-1.1.2.jar:\
$HOME/ltdtool-1.0.0/lib/ltdtool-1.0.0.jar
[node:~] echo $CLASSPATH
The second command in both of the examples above, will display the current value of the
CLASSPATH
variable. Please note that the value for the
CLASSPATH
variable may not contain space characters. Once the
CLASSPATH
is set, the tool can be executed with the following command:
[node:~] java gov.nasa.pds.ltdt.LTDTool <command-line arguments>
Specify the CLASSPATH on the Command-Line
An alternative method to setting the
CLASSPATH
variable is to specify the
java.ext.dirs
Java property on the command-line when running the tool each time. This is done by passing the property via the Java "-D" flag as demonstrated in the following example:
[node:~] java -Djava.ext.dirs=$HOME/ltdtool-1.0.0/lib \
gov.nasa.pds.ltdt.LTDTool <command-line arguments>
Specify the Jar on the Command-Line
Another alternative method is to specify the executable jar file on the command-line when running the tool each time. This is done by passing the
jar file specification via the Java "-jar" flag as demonstrated in the following example:
[node:~] java -jar \
$HOME/ltdtool-1.0.0/bin/ltdtool-1.0.0-app.jar \
<command-line arguments>
This section details the environment setup for Windows machines providing four different methods:
-
Specify the Batch File on the Command-Line
-
Set the CLASSPATH Environment Variable
-
Specify the CLASSPATH on the Command-Line
-
Specify the Jar on the Command-Line
Specify the Batch File on the Command-Line
The preferred method is to specify the batch file,
LTDTool.bat
, on the command-line. Setting the
PATH
environment variable to the location of this file, enables the batch file to be executed from any directory location on the user's machine.
The following command demonstrates how to set the
PATH
environment variable, by appending to its current setting.
C:\> set PATH=%PATH%;\
C:\ltdtool-1.0.0\bin
The tool can now be executed via the batch file as demonstrated in the following example:
C:\> LTDTool <command-line arguments>
Set the CLASSPATH Environment Variable
An alternative method is to set the
CLASSPATH
environment variable. The following commands demonstrate how to set this variable, by appending to its current setting.
The first example and preferred method for setting the variable, appends the executable jar file found in the
bin
directory:
C:\> set CLASSPATH=%CLASSPATH%;\
c:\ltdtool-1.0.0\bin\ltdtool-1.0.0-app.jar
C:\> echo %CLASSPATH%
The second example separately appends the dependent jar files, found in the
lib
directory:
C:\> set CLASSPATH=%CLASSPATH%;\
c:\ltdtool-1.0.0\lib\antlr-2.7.6.jar;\
c:\ltdtool-1.0.0\lib\commons-cli-1.0.jar;\
c:\ltdtool-1.0.0\lib\commons-collections-3.1.jar;\
c:\ltdtool-1.0.0\lib\commons-configuration-1.2.jar;\
c:\ltdtool-1.0.0\lib\commons-io-1.2.jar;\
c:\ltdtool-1.0.0\lib\commons-lang-2.1.jar;\
c:\ltdtool-1.0.0\lib\commons-logging-1.0.3.jar;\
c:\ltdtool-1.0.0\lib\product-tools-1.1.2.jar;\
c:\ltdtool-1.0.0\lib\ltdtool-1.0.0.jar
C:\> echo %CLASSPATH%
The second command in both of the examples above, will display the current value of the
CLASSPATH
variable. Please note that the value for the
CLASSPATH
variable may not contain space characters. Once the
CLASSPATH
is set, the tool can be executed with the following command:
C:\> java gov.nasa.pds.ltdt.LTDTool <command-line arguments>
Another way of setting the CLASSPATH is via the
Windows Control Panel
. If viewing this document in PDF form, see the appendix for details on this method.
Specify the CLASSPATH on the Command-Line
An alternative method to setting the
CLASSPATH
variable is to specify the
java.ext.dirs
Java property on the command-line when running the tool each time. This is done by passing the property via the Java "-D" flag as demonstrated in the following example:
C:\> java -Djava.ext.dirs=c:\ltdtool-1.0.0\lib \
gov.nasa.pds.ltdt.LTDTool <command-line arguments>
Specify the Jar on the Command-Line
Another alternative method is to specify the executable jar file on the command-line when running the tool each time. This is done by passing the jar file specification
via the Java "-jar" flag as demonstrated in the following example:
C:\> java -jar \
c:\ltdtool-1.0.0\bin\ltdtool-1.0.0-app.jar \
<command-line arguments>