Java的ZipFile报错:Caused by: java.util.zip.ZipException: invalid CEN header (bad entry name)

Posted zhangphil

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Java的ZipFile报错:Caused by: java.util.zip.ZipException: invalid CEN header (bad entry name)相关的知识,希望对你有一定的参考价值。

Windows系统上跑Java的ZipFile报错:Caused by: java.util.zip.ZipException: invalid CEN header (bad entry name)

Caused by: java.util.zip.ZipException: invalid CEN header (bad entry name)

原因是编解码出现错误,加入gbk编码格式解决:

ZipFile zf = new ZipFile(file, Charset.forName("GBK"));

以上是关于Java的ZipFile报错:Caused by: java.util.zip.ZipException: invalid CEN header (bad entry name)的主要内容,如果未能解决你的问题,请参考以下文章

解决sqoop导入报错:Caused by: java.sql.SQLException: Protocol violation

JDK运行报错:Caused[0] by NoSuchMethodError: java.nio.IntBuffer.rewind()Ljava

JDK运行报错:Caused[0] by NoSuchMethodError: java.nio.IntBuffer.rewind()Ljava

idea连接spark集群报错解析:Caused by: java.lang.ClassCastException

报错 Caused by: java.lang.ClassNotFoundException: javax.wsdl.OperationType的解决方式

报错 Caused by: java.lang.ClassNotFoundException: javax.wsdl.OperationType的解决方式