Basically, I have a jar file that i want to unzip to a specific folder from a junit test.
What is the easiest way to do this?
I am willing to use a free third party library if it’s necessary.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could use
java.util.jar.JarFileto iterate over the entries in the file, extracting each one via itsInputStreamand writing the data out to an external File. Apache Commons IO provides utilities to make this a bit less clumsy.