1

I started using Eclipse today to develop my java programs (did not move/touch any settings).

I try to run the Java programs, and I get this message:

Error: Could not find or load main class CLASSNAME

This happens for ALL my java programs, including those I developed before (and ran without problems on Eclipse). However, this was not the case yesterday; I was able to run developed programs without problem.

I did not uninstall/change my Java installation. The developed programs run without problem when I use another IDE to run it...

How to fix this? Thanks!

01jayss
  • 1,400
  • 6
  • 19
  • 28

3 Answers3

1

i think their is a problem in your CLASSPATH variable. use echo %CLASSPATH%, the first entry in it should be (.)

Shivam Shah
  • 524
  • 5
  • 10
1

Clean and build the project will work, if not try the same thing for work space.

Soman.

Ashok
  • 461
  • 2
  • 5
  • 23
1

I had same problem one of the jar files was missing which i removed in the configure build path it started working fine for me.

Shashi
  • 265
  • 1
  • 4
  • 13