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

AccessControlException received when specifying Codebase

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not an Issue
    • P4
    • None
    • 1.3.0
    • deploy
    • x86
    • windows_nt, windows_2000

    Description



      Name: yyT116575 Date: 01/16/2001


      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
      Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)

      I have written an applet that accesses native code on the client pc. I have
      coverted the HTML file to use the Java 2 Plug-in. It is able to run and
      view in the appletviewer.

      It will run in the Netscape and IE with the following entry in file:
      .java.policy:

      grant {
            permission java.security.AllPermission;
      };

      If 'codebase' is specified:
      grant codeBase "http://fncpc/dennisw/-" {
            permission java.security.AllPermission;
      };

      The applet returns the following exception:
      java.security.AccessControlException: access denied (java.lang.RuntimePermission
      modifyThreadGroup)
      at java.security.AccessControlContext.checkPermission(Unknown Source)
      at java.security.AccessController.checkPermission(Unknown Source)
      at java.lang.SecurityManager.checkPermission(Unknown Source)
      at sun.applet.AppletSecurity.checkAccess(Unknown Source)
      at java.lang.ThreadGroup.checkAccess(Unknown Source)
      at java.lang.Thread.init(Unknown Source)
      at java.lang.Thread.<init>(Unknown Source)
      at javax.swing.TimerQueue.start(Unknown Source)
      at javax.swing.TimerQueue.<init>(Unknown Source)
      at javax.swing.TimerQueue.sharedInstance(Unknown Source)
      at javax.swing.JApplet.<init>(Unknown Source)
      at
      osf.prs.patientreggui.PatientRegApplet.<init>(PatientRegApplet.java:14)
      at java.lang.Class.newInstance0(Native Method)
      at java.lang.Class.newInstance(Unknown Source)
      at sun.applet.AppletPanel.createApplet(Unknown Source)
      at sun.plugin.AppletViewer.createApplet(Unknown Source)
      at sun.applet.AppletPanel.runLoader(Unknown Source)
      at sun.applet.AppletPanel.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)

      (Review ID: 115162)
      ======================================================================

      Attachments

        Activity

          People

            mafishersunw Margarita Fisher (Inactive)
            yyoungsunw Yung-ching Young (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: