I can’t run the java program in the CMD,but it’s OK in the eclipse.

These are my configures:
CLASSPATH:.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar
JAVA_HOME:C:\Program Files\Java\jdk1.7.0_03
PATH:%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin
I don’t think there is something wrong with the program,because I am not successful in running even one program.All these programs come from the official website of Head First Java.I can use javac without any problems.
I can only provide these now.If you need more information.I’ll provide it to you.
You should be in
f:\pro\hfjavafinalsamplesand runYou need to give the
javacommand the fully qualified class name, which according to the error message ischap01.BeerSong. Thenjavawill look for the classBeerSongwithin thechap01package by checking in thechap01directory.Note that Java is case-sensitive as well, even though the file system isn’t – the class simple name is
BeerSong, notbeersong.