java.util.zip.ZipException: invalid CEN header (bad signature)

后端 未结 1 717
夕颜
夕颜 2020-12-11 03:38

I\'m getting this error when doing this (relatively simple) piece of code:

    ZipFile zf = new ZipFile(fn);
    Enumeration eze =          


        
相关标签:
1条回答
  • 2020-12-11 04:02

    7z l -slt output provided in your comment is quite useful:

    Type = zip 64-bit

    gives a hint, that it's ZIP64 (version 4.5 of ZIP specification). However, though Java7 supports it, this support is not backported to Java6 at the moment and you will have to resort to external library such as Apache Compress.

    P.S. For reference, file test.zip would output something like

    test.zip: Zip archive data, at least v4.5 to extract
    
    0 讨论(0)
提交回复
热议问题