javac is unable to recognize classpath in win2000.
I tried setting classpath with no success.
Could this have anything to do with the several hotfixes from Microsoft? reason is this wayback this OS without the most recent service pack work well on another machine. Please help what am i doing wrong?
If I were able to compile withing the source directory I would be contented but I am unable to compile source code that requires calling other external classes though they reside in the same directory.
classpath on NT and Unix like systems (which includes Win2000) does not by default include the current directory. Add ;. at the end of your classpath.
To be able to compile from anywhere check the javac help, it should tell you that you can include a commandline option -sourcepath <path> and -d <path> to tell the compiler where to read sources and write compiled classfiles.
Jeroen points out something very important, but doesn't necessarily state it directly enough:
You seem to be assuming that javac uses CLASSPATH to find *.java files. That's wrong -- it does not. It only uses CLASSPATH to find *.class files. There is a command-line -sourcepath option you can use, or (as I believe is far, far more common) you can compile from the directory where the source is located.
As far as the syntax error in MainSourceCode.java: that has nothing to do with the classpath -- your code needs fixing.
So to say this all again: from your description, it appears that everything is working as its supposed to. [ October 14, 2004: Message edited by: Ernest Friedman-Hill ]