java.security.AccessControlException

N

nandu

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
 
T

Thomas Hawtin

nandu said:
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


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
 
J

John Ersatznom

Thomas said:
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

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. :)
 
N

nandu

Thomas said:
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.

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
 

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

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top