0

I'm trying to open some .jar archieve and get files from it. What i've got now:

  1. As i know .jar==.zip, so i used 7zip. It opens my jar and says that headers broken and still succeeded extraction.
  2. I used standard Oracle jdk utility jar tvf my.jar and got this:
    java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:219) at java.util.zip.ZipFile.<init>(ZipFile.java:149) at java.util.zip.ZipFile.<init>(ZipFile.java:120) at sun.tools.jar.Main.list(Main.java:1115) at sun.tools.jar.Main.run(Main.java:293) at sun.tools.jar.Main.main(Main.java:1288)

  3. I searched the web and found PowerGREP5 tool that opens this jar.

jar archieve was extracted from parent .zip archieve, that had valid CRC and unziped without any errors

Problem goes here:

Contents, that i got from 7zip complitely differs from PowerGREP. Pls help me to understand how could this happen.

Jin
  • 31
  • 7
  • Java only supports the DEFLATE and STORE compression methods. The file likely uses another compression method, or is not actually a ZIP file, or is corrupt (aka "broken"). – Andreas Apr 06 '17 at 17:13
  • @Andreas, how can i know which copression method is used? And why content, that i got from 7z and powerGREP differs? – Jin Apr 06 '17 at 17:15

1 Answers1

-1

you have miss hyphen(-) in before tvf, use bellow command

 jar -tvf my.jar
Anshul Sharma
  • 3,432
  • 1
  • 12
  • 17