Problem with socket permission

R

Ravikumar

Hi,

I am writing a socket progarm . while I am excuting the program in
aglets I got the following exception

access denied (java.net.SocketPermission 127.0.0.1:161 connect,resolve)

Problem in closing socket. access denied (java.net.SocketPermission
127.0.0.1:45
33 connect,resolve)

The java.policy file is as follows

// Entry granting permissions to aglets code.
grant codeBase "file:C:/Ravikumar/SoftWare/Aglets/Aglets2.0.2/lib/-" {
permission java.security.AllPermission;
};


The java file compiled sucessfully and add the applicationlist also.

Please help to resolve this error.

Thanks in Advance.

Thanks
Ravikumar
 
S

Simon

Ravikumar said:
// Entry granting permissions to aglets code.
grant codeBase "file:C:/Ravikumar/SoftWare/Aglets/Aglets2.0.2/lib/-" {
^^^
This isn't a well-formed URL. It lacks the double slashes.

Cheers,
Simon
 
R

Ravikumar

Hi Simon,

Thanks for your prompt reply.

The java.policy file is generated by aglets. Also I tried with policy
file as

// Entry granting permissions to aglets code.
grant codeBase "file:C:///Ravikumar/SoftWare/Aglets/Aglets2.0.2/lib/-"
{

and didn't hit any sucess. Please let you guide me in the right
direction.

Any thoughts will be highly appreciated.

Thamks in Advance.

Thanks
Ravikumar
 
R

Ravikumar

Hi All,

I have add the following line in the java.policy file of JRE1.5 and
work fine.
permission java.net.SocketPermission "*:1-65535",
"listen,accept,connect,resolve";

Thanks for all your help.

:)-

Thanks & Regards
Ravikumar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top