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

java vm can't handle compressed jars in -classpath

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P1 P1
    • None
    • 1.1.1
    • hotspot
    • generic
    • solaris_2.5.1

      The following reproduction steps demonstrate how java can't handle compressed
      jars/zips. This is a severe deficiency in our opinion. We are forced to demand
      that all our JWS/JS 3rd party contracts only ship uncompressed jars and/or
      contrive elaborate workarounds/disclaimers

      /set/dist/sparc-S2/JDK1.1.1A/bin/java -classpath /set/dist/sparc-S2/JDK1.1.1A/lib/classes.zip:.:./jelly.jar test

      will fail with a java.lang.NoClassDefFoundError

      jelly.jar is as what comes with the BDK under jars
      test.java contains:
      import sunw.demo.jelly.JellyBean;
       
      public class test {
              public static void main(String args[]) {
                  new JellyBean();
                  System.out.println(" created JellyBean");
              }
      }


      ===================================

      To: richm
      CC: djo, lynnm, pelegri, dac, jrose
      Subject: re: java & compressed jars
      Reply-to: Eduardo Pelegri-Llopart <###@###.###>
      --text follows this line--
      I think this is a bug (or a lack of a bug fix) in your specific 1.1.1A
      & 1.1A JVMs. I tried the relevant released JDKs (1.1 and 1.1.1) and
      they work. I also tried the latest 1.1.2.

      On 1.1beta3.3, it fails in a way similar to how it fails on your "A"
      versions, so I suspect that maybe the bug fix didn't get applied
      properly.

      John, Dac, this is regarding 4047316, which boils to "java" does not
      accept compressed JAR files in its CLASSPATH.

      I'm adding this message to the bug, but it is still assigned to DAC
      :-).

      - eduardo


      calterra% setenv THREADS_FLAG green

      calterra% /net/widow/export/widow3/sun4-SVR4-OWV3/JDK1.1A/bin/java -classpath jelly.jar:.:/net/widow/export/widow3/sun4-SVR4-OWV3/JDK1.1A/lib/classes.zip test
      java.lang.NoClassDefFoundError: sunw/demo/jelly/JellyBean
      at test.main(Compiled Code)

      calterra% /net/widow/export/widow3/sun4-SVR4-OWV3/JDK1.1.1A/bin/java -classpath jelly.jar:.:/net/widow/export/widow3/sun4-SVR4-OWV3/JDK1.1.1A/lib/classes.zip test
      java.lang.NoClassDefFoundError: sunw/demo/jelly/JellyBean
      at test.main(Compiled Code)

      >>>>>>>>>>>>> <<<<<<<<<<<<

      calterra% /usr/local/java/jdk1.1/solaris/bin/java -classpath jelly.jar:.:/usr/local/java/jdk1.1/solaris/lib/classes.zip test
       created JellyBean

      calterra% /usr/local/java/jdk1.1.1/solaris/bin/java -classpath jelly.jar:.:/usr/local/java/jdk1.1.1/solaris/lib/classes.zip test
       created JellyBean

      calterra% /usr/local/java/jdk1.1.2/solaris/bin/java -classpath jelly.jar:.:/usr/local/java/jdk1.1.2/solaris/lib/classes.zip test
       created JellyBean

      calterra% /usr/local/java/jdk1.1beta3.3/solaris/bin/java -classpath jelly.jar:.:/usr/local/java/jdk1.1beta3.3/solaris/lib/classes.zip test
      java.lang.NoClassDefFoundError: sunw/demo/jelly/JellyBean
      at java.lang.Thread.init(Thread.java)

            dconnellsunw David Connelly (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: