The JVM needs to know the path of every class file needed by your application. The classpath is a list of the class libraries needed by the JVM and other Java applications to run your program. You can set the CLASSPATH environment variable in the operating system either temporarily, permanently, or at run time when you start your Java application and the JVM. If you set the environment variable temporarily, you must set it each time that you open a new command window.
In most development environments, it is best to
set the operating system's CLASSPATH environment variable temporarily.