if your package name is same with your class name this problem will occur.


this happened to me. i noticed that someone said i have to create an entire new workshop! why? because i installed a newer jre version and that won't allow other previous versions to run on it. so all those old files i have become useless in a way. not really, just copy and paste it to new class and change it to an unused class name.


that's because you guys created the class one time with the main method & after that may be you have been deleted that form or workplace & still some of the files exist ,i will suggest you to create that form or workspace again & then delete it by clicking on it completely,then after that if you created the some class like runner class try to run it again.


same problem occur with me.i went to project > properties > java buildpath.

there in order of export , i moved up my java/main to the top priority.


it seems that the class is not compiled by eclipse.

few pointers could be-

  1. check if the .class file exists in your output know your output folder right click on project->properties->java build path(check at bottom).
  2. check if project->build automatically is checked in the menu.
  3. check if the helloworld class is in src folder or not.right click on project->properties->java build path(check source tab).


i deleted a jar file from the bin directory. right click on your project - properties then libraries tab. there was a red flag in there. i removed the jar file from the libraries and it worked.


i just ran into that problem. the cause... not sure. however, only happened after i added a new jvm. my solution:

  • went to run configurations: - run->run configurations

in the classpath tab:

  • select advanced
  • add where eclipse usually put the *.class for the projects, which is in bin. so i added the bin directory for the project.

i hope it helps someone out there. it took me time to figure this out.


this just happened to me today after updating my jre. i cleaned the project and it started working again.

project -> clean will remove any existing class files and completely rebuild the project. there's more information on eclipse's clean function here.

Related Query

More Query from same tag