1.maven
<dependency>
<groupId>net.lingala.zip4j</groupId>
<artifactId>zip4j</artifactId>
<version>1.3.2</version>
</dependency>
2.Code
ZipFile zipFile = new ZipFile(file1); // 防止乱码 zipFile.setFileNameCharset("UTF-8"); //解压后的输出路径 String outDIr = f.getParent(); File dest = new File(outDIr); zipFile.extractAll(outDIr);