导入项目时Eclipse报的几个错误

1.

The preferences for the xdoclet runtime does not point to a valid installation

 2.

Java compiler level does not match the version of the installed Java project

 以上两个错误的解决方案是:

右键项目“Properties”,在弹出的“Properties”--->“Project Facets”

1的问题是没有安装xdoclet,如果你也不想安装,把此属性去掉即可。

2的错误是因为jdk的版本不一致,调整jdk版本与本机安装的jdk版本一致即可

3.

cannot be read or is not a valid ZIP file
 
3.1. Archive for required library: ‘WebContent/WEB-INF/lib/readme.txt’ in project ‘xxxxxxxxx’ cannot be read or is not a valid ZIP file

3.2. The project cannot be built until build path errors are resolved

3.3. Target runtime Apache Tomcat v6.0 is not defined.
 

这三个问题都很好解决,方法如下:

3.1. 用记事本打开项目根目录的.classpath文件,找到“<classpathentry kind=”lib” path=”WebContent/WEB-INF/lib/readme.txt”/>”这一行,删掉

3.2. 第一个问题解决后,此问题也会消失

3.3. 打开项目根目录下.settings文件夹中的org.eclipse.wst.common.project.facet.core.xml文件,将 “<runtime name=”Apache Tomcat v6.0″/>”这一句改成现在所需要的tomcat版本,或者删除中间几行,只留下下面三行就行 “<?xml version=”1.0″ encoding=”UTF-8″?> <faceted-project> </faceted-project>”

猜你喜欢

转载自gwh-08.iteye.com/blog/1718573