Forum Stats

  • 3,780,843 Users
  • 2,254,447 Discussions
  • 7,879,483 Comments

Discussions

Urgent Please...

843811
843811 Member Posts: 49,851
Hi there ,
I am using jdk1.2.2 and I am getting an exception java.security.AccessControlException: access denied (java.net.SocketPermission 1
27.0.0.1:1099 connect,resolve)
I have made changes in policy file by granting all permissions .

i.e java.security.AllPermission;
permission java.net.SocketPermission "127.0.0.1:1024-", "accept,connect,listen";

Could you please give me some more details , what more changes I hace to make in java policy file.

Thanks in advance

Comments

  • 843811
    843811 Member Posts: 49,851
    Hi amaandhi,


    Generally accesscontrol exception will occur if you did not properly grant permission even to a specified file.

    I hope that you are using RMI application.

    Connect to ports greater than 1024

    grant
    {

    permission java.net.SocketPermission "*:1024-65535",
    "connect,accept";

    }

    connect to port 80

    grant
    {

    permission java.net.SocketPermission "*:80","connect";
    };

    Still if you cannot able to rectify the error, please send me your sample code, so that it will be helpful for me in giving a good solution.

    Thanks
    Bakrudeen
    Technical Support Engineer
    Sun MicroSystems Inc, India

This discussion has been closed.