August 2004
Intermediate to advanced
480 pages
9h 41m
English
Sometimes, your programs will reference external libraries that are custom libraries of your own, or a third-party library, or a package in the Java 2 Enterprise Edition. Use the set command to set the classpath environment variable. The classpath tells the Java Virtual Machine where to find necessary class libraries. These libraries can be directories, .jar files (most commonly), .class files, or even .zip files. The path to a .jar or .zip file ends with the file name; the path to a .class file ends with the directory name.
First, open a command prompt. Then type
set CLASSPATH=.;C:\java\MyClasses;C:\java\My.jar
Note that setting the classpath in this manner will only sustain the variable for the current command ...
Read now
Unlock full access