Java - Can not find or load Class

September 2017


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.


Published by aakai1056. Latest update on May 2, 2012 at 12:00 PM by aakai1056.
This document, titled "Java - Can not find or load Class," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (