2

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
1

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
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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