Getting jar content

99 Views Asked by At

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.

1

There are 1 best solutions below

1
Anshul Sharma On

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

 jar -tvf my.jar