/cp — Set CLASSPATH Option (JVIEW/WJVIEW)

Syntax

/cp classpath

Use the /cp option to set the CLASSPATH environment variable for the current compilation. Using this option specifies the path where JVIEW and WJVIEW can find system and user-defined .class files. The virtual machine for Java uses a platform-dependent default location, the CLASSPATH Environment Variable, and the Java Package Manager (JPM) database to find system classes. For more information on using the Java Package Manager, see the Java Package Manager documentation.

Note   The directories in the CLASSPATH environment variable are separated by semicolons on a Microsoft Windows system.

Example

On Windows NT, the following commands provide CLASSPATH information for JVIEW and WJVIEW:

JVIEW /cp X:.;X:\WINNT\java\classes\classes.zip;X:\WINNT\java\classes\

-or-

WJVIEW /cp X:.;X:\WINNT\java\classes\classes.zip;X:\WINNT\java\classes\

In this example JVIEW and WJVIEW search in and beneath the current directory and the x:\java\classes directory for system and user-defined classes.

Note   In the previous examples, X: designates the drive letter where the class or .zip files reside.