JAVAEclipse:could not find the main class,program will exit!

遇到这个错误主要是当前的工程的jdkeclipse的版本配置不匹配造成的,修改方法如下:

在当前工程点右键选择Properties->Java Compiler->选中Enable project specific settings->JDK Compliance中的Compiler compliance level:改为1.5或者1.4就可以了。