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
link|improve this question

77% accept rate
feedback

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
link|improve this answer
feedback

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

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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