Results 1 to 6 of 6
  1. #1
    bonjovi4u is offline Member
    Join Date
    Mar 2010
    Posts
    28
    Rep Power
    0

    Default Access Control Exception

    hey pals

    i have 2 classes one is....

    main class

    class mainclass
    {
    public static void main(String[] arg)
    {

    }
    }

    and the orther is connectionclass

    class connectionclass
    {
    .....
    .....
    .....
    .....
    .....
    .....
    }


    now when i use connectionclass in my mainclass likje this...


    class mainclass
    {
    public static void main(String[] arg)
    {
    connectionclass object = new connectionclass();
    }
    }

    a new connection is created in and this can be seen on server console'

    which means a new client is connected to server

    which definately means if i make the object of connectionclass in the project it will lead to connection of client to the server


    but now the problem lies here when i try to create the object of connectionclass in the init method of my applet all the object are created ithe applet and there are visible too on ly thing which remains is the connection when i go through the jre console i see the the Access control Exception on the line where outbut stream object is being initlized

    os = urlconnectionobject.getoutputstream();

    can any one help me out with the problem??

  2. #2
    bonjovi4u is offline Member
    Join Date
    Mar 2010
    Posts
    28
    Rep Power
    0

    Default

    Quote Originally Posted by bonjovi4u View Post
    hey pals

    i have 2 classes one is....

    main class

    class mainclass
    {
    public static void main(String[] arg)
    {

    }
    }

    and the orther is connectionclass

    class connectionclass
    {
    .....
    .....
    .....
    .....
    .....
    .....
    }


    now when i use connectionclass in my mainclass likje this...


    class mainclass
    {
    public static void main(String[] arg)
    {
    connectionclass object = new connectionclass();
    }
    }

    a new connection is created in and this can be seen on server console'

    which means a new client is connected to server

    which definately means if i make the object of connectionclass in the project it will lead to connection of client to the server


    but now the problem lies here when i try to create the object of connectionclass in the init method of my applet all the object are created ithe applet and there are visible too on ly thing which remains is the connection when i go through the jre console i see the the Access control Exception on the line where outbut stream object is being initlized

    os = urlconnectionobject.getoutputstream();

    can any one help me out with the problem??

    hey ppl its urgent help me out....

  3. #3
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,772
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by bonjovi4u View Post
    hey ppl its urgent help me out....
    And therefore you quoted your entire orignal message full of unformatted code?

    Jos

  4. #4
    bonjovi4u is offline Member
    Join Date
    Mar 2010
    Posts
    28
    Rep Power
    0

    Default

    all i want is help and that too urgent...

  5. #5
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default

    Your urgency is irrelevant to us.

    If your Applet is accessing something that isn't from the location it came from you will get an exception. I have no idea if that's what you're doing, because you have provided us with so little info.

  6. #6
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,883
    Rep Power
    25

    Default

    Please copy and paste here the full text of the error message.

Similar Threads

  1. network access control
    By yuhobebbho in forum Networking
    Replies: 0
    Last Post: 05-05-2010, 01:05 PM
  2. access control exception,while running rmi
    By megha in forum Advanced Java
    Replies: 3
    Last Post: 10-26-2008, 05:10 PM
  3. Replies: 1
    Last Post: 08-07-2007, 07:03 AM

Posting Permissions

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