Error: Could not find or load main clas (i can't write second s because it censors that word?!)


#1

I'm working on the classroom grades analyzer project in 'Learn Java: 4 Data Structures'.

Toward the end of the project, I started getting errors that didn't make sense, so I reset the whole project and started over. Now it seems no matter what I do, I get the error:

"Error: Could not find or load main clas GradesAnalyzer"

I tried clearing my cached images, my cookies (because why not), logging out of Code Academy, restarting Chrome, restarting my computer... and I even tried skipping to the next project, but I'm getting the same error there. This must be something out of my hands.

Help!


#2

Makes sense that it can't find your code if you removed it. Makes less sense that cc would remove it on reset if it was originally there, that isn't what the word reset means..

Try adding the class back (same name as the file) and give it a main method. Refer to other exercises or google for java hello world if you don't remember what that looks like.

nate@laptop → ls  # list files in this directory. It's empty (no output)
nate@laptop → java Hello  # execute the Hello class (which isn't here)
Error: Could not find or load main class Hello

#3

Thanks, adding the class back in seemed to solve the problem. Running and Saving without errors now.


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.