The following program is throwing error:
public class HelloWorld { public static void main(String args[]) { System.out.println(\"Hello World!\");
Your CLASSPATH needs to know of the location of your HelloWorld class also.
CLASSPATH
HelloWorld
In simple terms you should append dot . (means current directory) in the CLASSPATH if you are running javac and java commands from DOS prompt.
.
javac
java