I'm getting this error when doing this (relatively simple) piece of code:
ZipFile zf = new ZipFile(fn);
Enumeration<? extends ZipEntry> eze = zf.entries();
while (eze.hasMoreElements()) {
ZipEntry ze = eze.nextElement();
System.out.println(ze.getName());
}
zf.close();
Actually. Interestingly enough, I get it on java-sun-6u32 and java-1.6.0-openjdk-amd64, but java-sun-7u4 succeeds. unzip itself seems to handle it fine. I'm guessing that means that these zipfiles are perhaps created by some newer version of zip that java 7 understands, but that previous versions do not. But, any insight would be appreciated. Also, since in production I don't really have the option of using java 7, any way of making earlier versions of java understand this new version of zip (if that in fact is what the problem is, of course.)
Thanks!
file your.zip
say? Or you can just chop off first 512 kb or so off file and place somewhere. – Ginkgo