Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a test.jar file on windows and I want to use 7-zip to get a certain file from outside of the archive, such as the "com/app/test/FILE.class" file. I only have access to java, 7-zip, and the regular DOS utilities from the batch file. How can I accomplish this? Should I unzip , search through it, pull it out, then delete the temp files? What is the best way? I am unable to find very much info on the 7-zip 'e' command capabilities.

This didnt work:

7z.exe -e test.jar -x com\app\test\FILE.class
share|improve this question
add comment

2 Answers

To extract FILE.class directly to current directory:

7z.exe e test.jar com\app\test\FILE.class

To extract file to com\app\text\FILE.class in current directory (folders will be created if they don't exist):

7z.exe x test.jar com\app\test\FILE.class
share|improve this answer
add comment

Have you tried 7z.exe e (without the '-')? According to the extract command description you don't need the hyphen.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.