Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2011
    Posts
    6
    Rep Power
    0

    Question AccessControlException createClassLoader

    I'm using custom class loader and the Microsoft JDBC driver in my applet. When my class loader calls super() in the body of its constructor (creates new instance of class loader) I get
    java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "createClassLoader")
    Now, I have tried running applet through jnlp
    <param name="jnlp_href" value="permissions.jnlp">
    with
    <security>
    <all-permissions/>
    </security>
    ...but the browser just freezes to death.

    Later, I have signed the JAR containing my applet, and I still get
    java.security.AccessControlException
    Is there a solution to this? Please, don't suggest
    grant {
    permission java.security.AllPermission;
    };
    It's a heavy, not user-friendly solution.
    Last edited by JavaCommando; 12-05-2011 at 01:25 PM.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,308
    Rep Power
    25

    Default Re: AccessControlException createClassLoader

    Does the applet work with the shown changes to the .java.policy file?

  3. #3
    Join Date
    Dec 2011
    Posts
    6
    Rep Power
    0

    Default Re: AccessControlException createClassLoader

    Yes.

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,308
    Rep Power
    25

    Default Re: AccessControlException createClassLoader

    It seems like signing should give you the permissions you need.

  5. #5
    Join Date
    Dec 2011
    Posts
    6
    Rep Power
    0

    Default Re: AccessControlException createClassLoader

    1. keytool -genkey -keystore myKeyStore -alias me

    2. keytool -selfcert -keystore myKeyStore -alias me

    3. jarsigner -keystore myKeyStore jarfile.jar me
    I've tried signing - no use:
    java.security.AccessControlException

Similar Threads

  1. AccessControlException
    By hayley in forum JDBC
    Replies: 2
    Last Post: 08-05-2011, 09:31 AM
  2. AccessControlException
    By DarthCoffee in forum Networking
    Replies: 2
    Last Post: 03-15-2011, 10:37 PM
  3. accesscontrolexception in applets
    By nishant.4545 in forum Java Applets
    Replies: 0
    Last Post: 07-04-2009, 11:35 AM
  4. java.security.AccessControlException
    By cecily in forum Java Applets
    Replies: 1
    Last Post: 08-06-2007, 02:49 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •