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

Regression: applets loaded from local disk can not access co-located resources

    XMLWordPrintable

    Details

    • Subcomponent:
    • Introduced In Version:
    • Resolved In Build:
      b03
    • CPU:
      generic, x86
    • OS:
      generic, windows_xp
    • Verification:
      Verified

      Backports

        Description

        The fix for 6716217 has introduced a regression where a developer's applet can no longer access its resources when loaded from the local disk. This issue is described on the forum thread http://forums.java.net/jive/thread.jspa?threadID=54799&tstart=0 .

        A test case is attached. Navigate to the included HTML file. With 6u10 and earlier the applet will load. With 6u11 and later the applet will throw an AccessControlException that can be seen on the Java Console.

        The directory setup is as follows:

           testcase/
                    index.html
                    jars/applet.jar
                    images/image.jpg

        The index.html references applet.jar in the applet tag. The codebase for the applet is set to be the "testcase" directory. The applet attempts to load the resource "images/image.jpg". With 6u11 and later this is throwing an AccessControlException because the applet is only receiving permissions to read recursively under the directory from which the jar was actually loaded rather than the codebase as in earlier releases.

        This compatibility issue may impact an unknown number of developers.

        One possible solution would involve granting permissions to read recursively under the document base of the applet.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                ngthomas Thomas Ng (Inactive)
                Reporter:
                kbr Kenneth Russell (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: