Error: Archive for required library cannot be read or is not a valid ZIP file.

user3190398 picture user3190398 · Jan 13, 2014 · Viewed 37.5k times · Source

I am having trouble setting up the build path of my java project. I am currently in a Co-Op IT position so I am somewhat new to all this. My background is mostly in C++ and I am learning java on the fly. I am also somewhat new to Eclipse (Kepler service release 1).

I am working on a bug on an existing program and need to get the program to build so I can work on it. When I add all of the external .jar files that I know for a fact are the right ones, I am getting this error on two of them :

"Archive for required library: '(location of file)' cannot be read or is not a valid ZIP file"

Two of the other full time guys on my team have gotten the program to run with those exact same .jar files, one running Eclipse Indigo and the other running the same Kepler version as myself. I also was able to open the two .jar files manually and everything appears to be there. After every trial trying to fix this, I have refreshed, cleaned and restarted eclipse. The two other full time guys said they have never seen this error. I would like to get some insight on this from anyone who has any similar experiences so that I don't have to use up much more of their time.

Answer

AnhSirk Dasarp picture AnhSirk Dasarp · Apr 23, 2014

I Had this issue, just fixed by deleting .jar files from Libs directory then copy->paste original Jars again. Then do a complete clean -> rebuild