Unpacking zip files in Java that cause a “java.util.zip.ZipException” - invalid LOC header (bad signature)

余生长醉 提交于 2019-12-08 00:21:26

The only way to unpack those files, I have found so far, is using a system command and use the "unzip" command line tool (Ubuntu 12.04 LTS, UnZip 6.00). As this is used in a server application it would be an acceptable hack, even though far away from being elegant.

Process p = Runtime.getRuntime().exec("unzip " + filename + " -d /tmp/mydir");
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!