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

java -jar z.jar fails when z.jar created using Info-zip

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 6
    • 6
    • tools
    • b79
    • generic
    • generic
    • Verified

      JDK 1.5.0 "java -jar ..." can no longer read some jar files created by
      Info-Zip's zip command.

      See self-explanatory shell transcript below:

       $ echo 'class Test {public static void main(String[] args) {}}' > Test.java && mkdir -p META-INF && (echo Manifest-Version: 1.0; echo Main-Class: Test) > META-INF/MANIFEST.MF && jver 1.4.2 javac Test.java && zip -q z.jar META-INF/MANIFEST.MF Test.class ; for v in 1.4.2 1.5.0 6.0; do echo $v; jver $v java -jar z.jar; done
      1.4.2
      1.5.0
      Invalid or corrupt jarfile z.jar
      6.0
      Invalid or corrupt jarfile z.jar

            jkowalsksunw Joseph Kowalski (Inactive)
            martin Martin Buchholz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: