The easiest way to extract jars in Java
•
Java
Basically, I have a jar file that I want to unzip from JUnit test to a specific folder
What is the easiest way? If necessary, I am willing to use a free third-party library
Solution
You can use Java util. jar. Jarfile iterates over the entries in the file, extracts each entry through its InputStream, and writes the data to an external file Apache commons IO provides utilities to make it less cumbersome
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码