javac ignores CLASSPATH
843804Oct 15 2001 — edited Oct 20 2001Hi everybody,
I am new to Java and currently I have a problem compiling my source files. I set the CLASSPATH to the directory in which my source files are stored, but it seems that jdk1.3.1 ignores the CLASSPATH.
Example:
My CLASSPATH is: F:\javaprojects;.
My PATH is: F:\jdk1.3.1_01\bin;.
My source file: F:\javaprojects\HelloWorld.java
The following error occurs:
C:\>javac HelloWorld.java
error: cannot read: HelloWorld.java
1 error
What does this mean? When I am changing my current directory to F:\javaprojects no error occurs and I am able to run the program:
F:\javaprojects>javac HelloWorld.java
F:\javaprojects>java HelloWorld
Hello World
Did I set a wrong CLASSPATH? Or has the current directory always to be the same as the directory in which my source files are stored? Somebody knows a solution?