java 读取jar包或解压缩zip报java.lang.IllegalArgumentException: MALFORMED 错误
java.lang.IllegalArgumentException: MALFORMED
at java.util.zip.ZipCoder.toString(Unknown Source)
at java.util.zip.ZipInputStream.readLOC(Unknown Source)
at java.util.zip.ZipInputStream.getNextEntry(Unknown Source)
at com.yc.utils.TestZip.extZipFileList(TestZip.java:40)
at com.yc.utils.TestZip.main(TestZip.java:21)
该问题搞了我半下午,最后确定确实是编码问题,查看该压缩包中是否有以中文命名的文件或者文件夹,改成英文后问题解决。亲测有效!!