Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2006

Tip: Looking for answers? Try searching our database.

Problem with socket permission

Thread view: 
Ravikumar - 15 Nov 2006 13:47 GMT
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
Simon - 15 Nov 2006 15:29 GMT
> // 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
Ravikumar - 18 Nov 2006 05:40 GMT
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

> > // Entry granting permissions to aglets code.
> > grant codeBase "file:C:/Ravikumar/SoftWare/Aglets/Aglets2.0.2/lib/-" {
[quoted text clipped - 3 lines]
> Cheers,
> Simon
仁者无敌 - 18 Nov 2006 08:54 GMT
try "file:///c:/Ravikumar/SoftWare/Aglets/Aglets2.0.2/lib/-"

On 11月18日, 下午1时40分, "Ravikumar" <ravikumar1...@gmail.com>
wrote:
> Hi Simon,
>
[quoted text clipped - 24 lines]
> > Cheers,
> > Simon- 隐藏被引用文字 -- 显示引用的文字 -
Simon - 20 Nov 2006 08:34 GMT
仁者无敌 schrieb:
> try "file:///c:/Ravikumar/SoftWare/Aglets/Aglets2.0.2/lib/-"

Even better yet: Try "file://c:/Ravikumar"

:-)

Cheers,
Simon
Ravikumar - 22 Nov 2006 11:20 GMT
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

> 仁者无敌 schrieb:
> > try "file:///c:/Ravikumar/SoftWare/Aglets/Aglets2.0.2/lib/-"
[quoted text clipped - 5 lines]
> Cheers,
> Simon


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.