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

lazy package and parts does not work in jnlp applets with new plugin

XMLWordPrintable

    • b01
    • generic
    • generic
    • Not verified

      testcase: http://javaweb.sfbay.sun.com/~ngthomas/lazypart/testJNLPApplet.html

      source: http://javaweb.sfbay.sun.com/~ngthomas/lazypart/testApplet.java

      a simple applet that calls into a method in draw package (draw.drawFoo.hello())

      draw.jar is listed in a component-ext jnlp file, with the package tag.

          <jar href="draw.jar" part="draw" download="lazy"/>
      <package name="draw.*" part="draw"/>

      when you load the applet, exception is thrown:

      Hello World testApplet!
      basic: JNLP2ClassLoader.findClass: draw.drawfoo: try again ..
      basic: Removed progress listener: null
      Exception in thread "thread applet-testApplet-1" java.lang.NoClassDefFoundError: draw/drawfoo
      at testApplet.init(testApplet.java:26)
      at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.ClassNotFoundException: draw.drawfoo
      at sun.plugin2.applet.Plugin2ClassLoader$3.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
      at sun.plugin2.applet.JNLP2ClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClassInternal(Unknown Source)
      ... 3 more


      but if you remove the "package" tag line from the jnlp file, it works.

      draw.jar contains a bunch of classes, including:
        402 Thu Sep 18 15:15:56 PDT 2008 draw/drawfoo.class

            hdongorcl Hao Dong (Inactive)
            ngthomas Thomas Ng (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: