Error: Could not find or load main class wordcount.WordCount

Hi I am using STS. I am new to Java. I am getting “Error: Could not find or load main class wordcount.WordCount”. Could you please help me.

Hi Madan

Please check your configuration parameter if you run your program via configuration.

In STS —> Run —> Run Configuration ----> Project(validate ur project name) -->Main Class( validate ur main class (package name. ur classname))

In pic: Main class --> retail is packagename and totalRevenuePerDay is main class name


Hi Venkatesh,

I checked package name and class name. Seems both are good. I am attaching the screen shot. Please check it and correct me.
My case mr is project, package name is wordcount and WordCount is class name.


Could you please help on the above issue.

Could you please any one help me on this.

Hi Madan,

will possible if we connect through skype and will try to resolve the issue.

My skype id karthivenkatesh.m. ping me, I will help you .


1 Like

There seem to be some issues with your project set up. You can see red colored exclamation on your project directory. You should not have those. Also there are some issues with your pom.xml