在工程目录下的.settings文件夹里,打开org.eclipse.wst.common.project.facet.core.xml文件,其内容是:
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="J2EE Runtime Library"/>
<fixed facet="java"/>
<fixed facet="jst.utility"/>
<installed facet="java" version="1.5"/>
<installed facet="jst.utility" version="1.0"/>
</faceted-project>
删除中间几行,只留下下面三行就可解决此问题
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
</faceted-project>