thanks for your quick answers:
In answer to Tom:
Yes I tried it from the command line.I'm using Windows XP
The classes and java-files are in
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\testJSP\WEB-INF\classes\foo
Documentation from Sun (
http://java.sun.com/j2se/1.3/docs/tooldocs/win32/javac.html)
states that when you don't specifiy classpath it looks in the current directory
That didn't work, the documentation doesn't seem correct?
So I gave the full classpath (the directory where I'm currently standing in by the way)
javac -classpath "C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\testJSP\WEB-INF\classes\foo" Employee.java
Same error
I tried it with
javac -classpath "C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\testJSP\WEB-INF\classes\foo\" Employee.java
it gave me the following error/message
javac: no source files
Usage: javac <options> <source files>
use -help for a list of possible options
I tried it with
javac -classpath "C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\testJSP\WEB-INF\classes\foo";. Employee.java
(this should add the current directory to the classpath, isn't it?)
Same result
As for the suggestion of Pramod
When I first do
javac -d . Employee.java
(with Person.class and Person.java already present in the directory)
it gives me the same error
But indeed when I first do
javac -d . Person.java
and then
javac -d . Employee.java
it compiles!
This behavoir really puzzles me.
Getting these simple classes to compile did cost me about 3 hours of valuable preparation time for the exam
I have found the behavoir of the javac compile command also in past experiences very user-unfriendly and often very different from what I would expect. But I guess I'm the only one here....