I am using Eclipse IDE to practice Java 5 coding as well as the DOS command line. I am referencing HeadFirst Java for practice and the code error I cannot fix is this from the command line and from within Eclipse IDE: Any help please?
You don't have the current directory (".") in your classpath. When you try to run a Java program from the command line, Java will search for class files in the directories and JAR files that are in your classpath.
Add the current directory to your classpath:
Notice the ";." at the end.
(Note: If the CLASSPATH environment variable is not set at all, Java will look in the current directory by default).
You can also use the "-cp" (or "-classpath") option as Fred suggests, to set the classpath on the command line explicitly. [ October 09, 2006: Message edited by: Jesper Young ]