Java - Can not find or load Class

October 2016


I've just started Java and this is my problem:
"Could not find or load the main class" followed by the name of the class when I run the command "Java" in command prompt.


If you compiled in command prompt, then you are working in a particular folder. So you must:
cd C:\...\workspace\
java HelloImad

Thanks KX for this tip.

Related :

This document entitled « Java - Can not find or load Class » from CCM ( is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.