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

JAVAX: AppletClassLoader fails to get resource from JAR in Class-Path.

    Details

      Description

      AppletClassLoader fails to get resource from JAR in Class-Path.

      The AppletClassLoader does not retrieve an image resource via its
      AppletClassLoader.getResource() method call when the image resource
      is specified in a separate JAR file that is specified in the Class-Path
      of the manifest file of the JAR file where the java program is.

      The test cases for this is: javax/tests/dwn/T13b

      This test case uses the "appletviewer" interpreter and hence uses the
      AppletClassLoader.

      Type "make all; make run" to run the test. It fails to get the image
      resource "sunlogo.gif" using the AppletClassLoader.getResource() method
      call.

      Here is the contents of the JAR file for test T13b.

         330 Thu Feb 12 09:41:20 EST 1998 META-INF/MANIFEST.MF
         274 Thu Feb 12 09:38:32 EST 1998 AppType.class
        3702 Thu Feb 12 09:38:32 EST 1998 T13b.class
         477 Thu Feb 12 09:38:32 EST 1998 T13bFrame$1.class
         971 Thu Feb 12 09:38:32 EST 1998 T13bFrame.class

      Here is the manifest file as part of the above JAR.

      Manifest-Version: 1.0
      Main-Class: T13b
      Class-Path: images.jar

      Here is the contents of the JAR file that contains the image.

         207 Thu Feb 12 09:41:22 EST 1998 META-INF/MANIFEST.MF
           0 Thu Feb 12 09:38:32 EST 1998 images/
           0 Thu Feb 12 09:38:32 EST 1998 images/SCCS/
        3027 Thu Feb 12 09:38:32 EST 1998 images/SCCS/s.sunlogo.gif
        1962 Thu Feb 12 09:38:32 EST 1998 images/sunlogo.gif

      The AppletClassLoader should be able to retrieve the URL to the image resource using its AppletClassLoader.getResource("images/sunlogo.gif") method call.

      Notice that the test javax/tests/dwn/T13 which is the same test case
      as above but uses the "java" interpreter PASSES. This test case uses
      the URLClassLoader which PASSES.
       

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: