CLASSPATH tells the Java Virtual Machine where to find class libraries. Use the set command to set the CLASSPATH environment variable.
The path to a .jar or .zip file ends with the file name ; the path to a .class file ends with the directory name.
Example:
Open a command prompt
set CLASSPATH=.;C:\java\MyClasses;C:\java\My.jar
Note that setting CLASSPATH in this manner will only sustain the variable for the current command prompt session. Closing the prompt and opening a new one resets the variable.
Top |