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 / December 2006

Tip: Looking for answers? Try searching our database.

java.security.AccessControlException

Thread view: 
nandu - 17 Dec 2006 17:42 GMT
Friends

Currently Iam working on a program to implement the Remote Desktop
feature of Windows using Java.The pgm was tested using two systems as
well as using the IP 127.0.0.1 on the same system.(Implies that it
contains a Server pgm as well as Client pgm)
To be precise it uses JAVA RMI . But when i try to run the same in my
sytem it shows the following error.Iam also using Zone Alarm Security
Suite for my XP SP1 machine which runs on an AMD64 1.8GHz.Iam using JDK
1.5 .

Output
----------
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

RMIregistry is  running.

G:\java\RMI\MySPyWatcher\with screenshot\built1>java MySpyServerImpl
Sorry dude!!!java.security.AccessControlException: access denied
(java.net.Socke
tPermission 127.0.0.1:1099 connect,resolve)

Could you please help me with this?Has it got anything to do with the
PORT issues of SP1 XP?I have heard something of that sort.Plz help
Thank you in advance
Thomas Hawtin - 17 Dec 2006 23:22 GMT
> G:\java\RMI\MySPyWatcher\with screenshot\built1>java MySpyServerImpl
> Sorry dude!!!java.security.AccessControlException: access denied
[quoted text clipped - 3 lines]
> Could you please help me with this?Has it got anything to do with the
> PORT issues of SP1 XP?I have heard something of that sort.Plz help

AccessControlException (extends SecurityException) is an exception from
security imposed by Java. It is not due to the operating system. Your
code needs the permissions specified in the error message.

Presumably you are setting an RMISecurityManager (which isn't actually
any different to SecurityManager) in order to download code from the
remote host (in this case it's just a loopback). Two easy options are to
supply a java.policy file to grant those permissions, or override
SecurityManager.checkConnect to skip the check.

Tom Hawtin
John Ersatznom - 18 Dec 2006 04:41 GMT
>> G:\java\RMI\MySPyWatcher\with screenshot\built1>java MySpyServerImpl
>> Sorry dude!!!java.security.AccessControlException: access denied
[quoted text clipped - 15 lines]
>
> Tom Hawtin

Personally, I'd be sure to learn this stuff and understand exactly what
the security model and threat model of the system is before granting new
permissions in some sort of remotely-accessible system, but hey, that's
just me. :)
nandu - 18 Dec 2006 18:03 GMT
> > G:\java\RMI\MySPyWatcher\with screenshot\built1>java MySpyServerImpl
> > Sorry dude!!!java.security.AccessControlException: access denied
[quoted text clipped - 13 lines]
> supply a java.policy file to grant those permissions, or override
> SecurityManager.checkConnect to skip the check.

Tahnk you very much for that timely help Mr Tom.Would definitely get
back to you after I resume my work on it after my Tests

> Tom Hawtin


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.