NonStop Server for Java 5.1 Programmer's Reference
The PATH shell variable must be created in each shell in which you plan to run java or one of its tools.
For this reason, it is a good idea to set the PATH in the .profile file in your home directory that is
executed each time you log on to an OSS shell. See the Open System Services User's Guide for
information on how to set the path in your startup file.
Class Path
The class search path (more commonly, class path) is the path that the Java runtime environment
searches for classes and other resource files. The class path tells the JDK tools and applications where to
find third-party and user-defined classes. The class path can be set either by using the -classpath
option when calling an JDK tool (such as java or javac) or by setting the CLASSPATH environment
variable.
The preferred method is using the -classpath option because you can set that option individually for
each application without affecting other applications and without other applications modifying the
option's value.
Syntax
jdkTool -classpath classpath1:classpath2...
-or-
export CLASSPATH=classpath1:classpath2...
jdkTool
A command-line tool, such as java or javac. For the tools list, see the NonStop
Server for Java 5.1 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