NonStop Server for Java 7.0 Programmer's Reference
export CLASSPATH=classpath1:classpath2...
jdkTool
A command-line tool, such as java or javac. For the tools list, see NonStop Server
for Java 7.0 Tools Reference.
classpath1:classpath2
Class paths to the .jar, .zip, or .class files. Each class path must end with a
filename or directory name depending on the specific 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 the default class path, 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 not directories or archives (.zip or .jar files) are ignored. For example,
Example 3 Setting CLASSPATH in a java command
If 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 must set the class path
so that it contains /java/MyClasses.
To run that application, use the following java command:
$java -classpath /java/MyClasses utility.myapp.Cool
Example 4 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 can
use the following command to set and export the CLASSPATH environment variable and then run
Java.
To run that application, use the following commands:
$ export CLASSPATH=/java/MyClasses
$ java utility.myapp.Cool
For more information about setting the classpath, see documentation available in Oracle web site
(http://docs.oracle.com/javase/7/docs/technotes/tools/index.html).
NOTE: When you are referring Oracle documentation for NSJ7, you must follow the instructions
provided for sh and ksh instead of csh and tcsh. Instructions for the setenv and unsetenv
commands do not apply to NSJ7.
JREHOME
JREHOME shell variable need not be set for NSJ7. However, if this variable is set, NSJ7 accepts
it. If this variable is set, then you must ensure that it points to the correct JDK.
For example, $ export JREHOME=/install_dir/nssjava/jdk170_h70/jre
Configuring NonStop system for NSJ7 25










