Is the CLASSPATH environment variable used correctly?
In JDK 1.0.2, beginners had to set CLASSPATH, and it had to include both system libraries and your programs. In JDK 1.2, CLASSPATH is no longer needed for system libraries. You do want CLASSPATH to point to the directories containing any “user classes” you’re using. Getting started, you will probably want at a minimum “.” (the current directory) in your CLASSPATH. When CLASSPATH is wrong, javac will tell you it can’t find definitions for classes you reference in the source file. For information on setting up the CLASSPATH, see Question 1.
In JDK 1.0.2, beginners had to set CLASSPATH, and it had to include both system libraries and your programs. In JDK 1.2, CLASSPATH is no longer needed for system libraries. You do want CLASSPATH to point to the directories containing any “user classes” you’re using. Getting started, you will probably want at a minimum “.” (the current directory) in your CLASSPATH. When CLASSPATH is wrong, javac will tell you it can’t find definitions for classes you reference in the source file. For information on setting up the CLASSPATH, see #21 following. 3. Is the source correct? Here javac will emit error and warning messages.