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

Regression: The JAR Tool "-c" option is somewhat broken in JDK1.2Beta3-G.

XMLWordPrintable

    • jar
    • 1.2beta3
    • sparc
    • solaris_2.6
    • Verified

      The JAR tool is somewhat broken using the "-c" option in some cases.

      The verbose output should all be going to STDERR. Instead some goes
      to STDERR and some goes to STDOUT. This is broken from the previous
      build and is a REGRESSION. This problem causes the following to fail.

      All verbose output from the "-c" option should be going to STDERR.
      This is how it worked in previous builds.

      Because of this problem my JAR Test Suite fails misserably because
      it depends on valid verbose output.

      The "jar.jar" file cannot be read now because the verbose output from
      the "-v" option is going to STDERR and STDOUT. By going to STDOUT it
      breaks the "jar.jar" file.

      Create a JAR file.

      % jar -cv dir > jar.jar

      Now cannot read the "jar.jar" file because of verbose output going to
      STDOUT.

      % jar -tvf jar.jar
      java.util.zip.ZipException: invalid entry size (expected 2313 but got 2361 bytes)
                                                                                     at java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:235)
                                                                                     at java.util.zip.ZipInputStream.read(ZipInputStream.java:100)
                                                                                     at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:78)
                                                                                     at sun.tools.jar.Main.list(Main.java:433)
                                                                                     at sun.tools.jar.Main.run(Main.java:102)
                                                                                     at sun.tools.jar.Main.main(Main.java:518)


      % jar -cvf jar.jar dir

      The following verbose output goes to STDERR:

      adding: dir/ (in=0) (out=0) adding: dir/images/ (in=0) (out=0) adding: dir/image
      s/SCCS/ (in=0) (out=0) adding: dir/images/SCCS/s.awake.gif (in=537) (out=398) ad
      ding: dir/images/SCCS/s.stop.gif (in=573) (out=400) adding: dir/images/SCCS/s.ri
      ght1.gif (in=577) (out=399) adding: dir/images/SCCS/s.right2.gif (in=585) (out=4
      08) adding: dir/images/SCCS/s.scratch1.gif (in=593) (out=415) adding: dir/images
      /SCCS/s.scratch2.gif (in=585) (out=408) adding: dir/images/SCCS/s.sleep1.gif (in
      =512) (out=375) adding: dir/images/SCCS/s.sleep2.gif (in=522) (out=386) adding:
      dir/images/SCCS/s.yawn.gif (in=581) (out=409) adding: dir/images/stop.gif (in=13
      8) (out=143) adding: dir/images/right1.gif (in=136) (out=141) adding: dir/images
      /awake.gif (in=152) (out=157) adding: dir/images/scratch1.gif (in=146) (out=151)
       adding: dir/images/yawn.gif (in=142) (out=147) adding: dir/images/right2.gif (i
      n=142) (out=145) adding: dir/images/scratch2.gif (in=141) (out=146) adding: dir/
      images/sleep1.gif (in=135) (out=140) adding: dir/images/sleep2.gif (in=141) (out
      =146) adding: dir/SCCS/ (in=0) (out=0) adding: dir/SCCS/s.Neko2$1.class (in=1534
      ) (out=997) adding: dir/SCCS/s.Neko2$2.class (in=1538) (out=996) adding: dir/SCC
      S/s.Neko2.class (in=6298) (out=3455) adding: dir/SCCS/s.Neko2.html (in=447) (out
      =286) adding: dir/SCCS/s.Neko2.java (in=5856) (out=1783) adding: dir/SCCS/s.Scro
      llingTextThread.class (in=3526) (out=2065) adding: dir/Neko2$1.class (in=879) (o
      ut=544) adding: dir/Neko2.html (in=130) (out=98) adding: dir/Neko2$2.class (in=8
      80) (out=545) adding: dir/Neko2.class (in=4336) (out=2389) adding: dir/Neko2.jav
      a (in=5539) (out=1605) adding: dir/ScrollingTextThread.class (in=2314) (out=1360
      )

      The following verbose output goes to STDOUT:

      (stored 0%)
      (stored 0%)
      (stored 0%)
      (deflated 25%)
      (deflated 30%)
      (deflated 30%)
      (deflated 30%)
      (deflated 30%)
      (deflated 30%)
      (deflated 26%)
      (deflated 26%)
      (deflated 29%)
      (deflated -3%)
      (deflated -3%)
      (deflated -3%)
      (deflated -3%)
      (deflated -3%)
      (deflated -2%)
      (deflated -3%)
      (deflated -3%)
      (deflated -3%)
      (stored 0%)
      (deflated 35%)
      (deflated 35%)
      (deflated 45%)
      (deflated 36%)
      (deflated 69%)
      (deflated 41%)
      (deflated 38%)
      (deflated 24%)
      (deflated 38%)
      (deflated 44%)
      (deflated 71%)
      (deflated 41%)

      The JAR Test Suite should PASS for Solaris and FAIL in 2 cases for WIN32.

      The JAR Test Suite can be gotten from:

      /js/files7/JDK_tests/JDK1.2/tools/jar

            dconnellsunw David Connelly (Inactive)
            aefreche Alan Frechette (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: