I installed Java 1.7.0 in the following folder C:\\Program Files\\Java. My operating system is Windows XP(Version 2002) with Service pack 3.
The envir
JAVA_HOME is not necessary if you start java and javac from the command line. But JAVA_HOME should point to the real jdk directory, C:\Program Files\Java\jdk1.7.0 in your case.
I'd never use the CLASSPATH environment variable outside of build scripts, especially not global defined. The -cp flag is better. But in your case, as you do not need additional libraries (rt.jardoesn't count), you won't need a classpath declaration. A missing -cp is equivalent to a -cp . and that's what you need here)
The (I was pretty sure, that a source file needs one public class... or was it one public class at most ?)HelloWorld class needs to be declared as public. This actually may be the cause for your problems.