解决java web项目导入后出现的问题 ---cannot be read or is not a valid ZIP file

导入以前的web项目后会出现以下三个错误:

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

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

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

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

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

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

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>”

上一篇:hdu 4585 Shaolin treap


下一篇:Archive required for library “xxx” cannot be read or is not a valid zip file报错解决