I had almost the same problem, but with the following variation:
- I've imported a ready-to-use maven project into Eclipse IDE from PC1 (project was working there perfectly) to another PC2
- when was trying to run the project on PC 2 got the same error "Could not find or load main class"
- I've checked PATH variable (it had many values in my case) and added JAVA_HOME variable (in my case it was JAVA_HOME = C:\Program Files\Java\jdk1.7.0_03)
After restarting Ecplise it still didn't work
- I've tried to run simple HelloWorld.java on PC2 (in another project) - it worked
- So I've added HelloWorld class to the imported recently project, executed it there and - huh - my main class in that project started to run normally also.
That's quite odd behavour, I cannot completely understand it.
Hope It'll help somebody. too.