NonStop Server for Java Programmer's Reference (NSJ 4.2+)
Syntax
sdkTool -classpath classpath1:classpath2...
-or-
export CLASSPATH=classpath1:classpath2...
sdkTool
A command-line tool, such as java or javac. For the tools list, see the
NonStop Server for Java Tools Reference.
classpath1:classpath2
Class paths to the .jar, .zip, or .class files. Each class path should end
with a filename or directory name depending on the particular setting.
For a .jar or .zip file that contains .class files, the class path ends with
the name of the .jar or .zip file.
❍
For .class files in an unnamed package, the class path ends with the
directory name that contains the .class files.
❍
For .class files in a named package, the class path ends with the
directory name that contains the "root" package (the first package in the
full package name).
❍
Multiple path entries are separated by colons.
The default class path is the current directory. Setting the CLASSPATH variable or using the
-classpath command-line option overrides that default, so if you want to include the current
directory in the search path, you must include a dot (.) in the new settings.
Class path entries that are neither directories nor archives (.zip or .jar files) are ignored.
Example: Setting Class Path in a java Command
Suppose you want the Java runtime to find a class named Cool.class in the package
utility.myapp. If the path to that directory is: /java/MyClasses/utility/myapp, you
would set the class path so that it contains /java/MyClasses.
To run that application, you could use the following java command:
$java -classpath /java/MyClasses utility.myapp.Cool
Example: Setting the CLASSPATH Environment Variable
Using the same situation as in the preceding example, except that you want to set the CLASSPATH
environment variable so that the Java runtime can find the class named Cool.class, you would
use the following command to set and export the CLASSPATH environment variable and then run
Java.
To run that application, you could use the following commands:
$ export CLASSPATH=/java/MyClasses