Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4421383

For some erronous jar-files, jar-tool does silently not extract anything.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.3.0
    • tools
    • jar
    • x86
    • windows_2000



      Name: ssT124754 Date: 03/02/2001


      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
      Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)

      For some erronous jar-files, jar-tool does silently not extract anything.
      It should at least report an error!
      In comparison, WinZip (comandline-tool WZUNZIP) still extracts, but gives a
      warning.

      The following example uses jmf.jar (ok example) and mediaplayer.jar (problem
      example) from JMF 2.1.

      1) Do
      "C:\Program Files\WinZip\WZUNZIP" -do jmf.jar meta-inf/Manifest.mf
      As you see, this works with WZUNZIP (no error message)

      2) Try
      jar fx jmf.jar META-INF/manifest.mf
      and it alsow works with the jar-tool.

      3) But with some jar-files, WZUNZIP works, but the jar-tool not. Try
      "C:\Program Files\WinZip\WZUNZIP" -do mediaplayer.jar meta-inf/Manifest.mf
      this yields the following message:

        unzipping META-INF/MANIFEST.MF
        Warning: the size of the extracted file (3401) does not match the
      uncompressed size (0) recorded in the zip file

      but - IMPORTANT - it extracts the file !

      4) Now, doing the same with the jar-tool, yields NO ERROR MESSAGE AND NO FILE
      IS EXTRACTED !!!
      jar fx mediaplayer.jar META-INF/manifest.mf

      Thanks and bye, Stefan
      (Review ID: 118008)
      ======================================================================

            kkladkosunw Konstantin Kladko (Inactive)
            ssultanasunw Shaheen Sultana (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: