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"));