Basically, in this error, java tries to find the .class file in your current directory, so you need to change the directory something like this:
cd c:\java
And then, execute this command, will help:
java -classpath . HelloWorld
I hope this will help.
Want to become a Java Expert? Join Java Certification now!!
Want to know more about Java? Watch this tutorial on Java Course | Java Tutorial for Beginners: