This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Distributed Java and the fly likes RMI security problem Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Distributed Java
Reply Bookmark "RMI security problem" Watch "RMI security problem" New topic
Author

RMI security problem

chi Lin
Ranch Hand

Joined: Aug 24, 2001
Posts: 348
Hi,
I follow RMI example code on one book, all files compile OK,
when I tried to run the code, I got some exception message like,
java.security.AccessControlException : access denied
if I comment out the following line, whole thing runs OK
// System.setSecurityManager( new RMISecurityManager());
could someone advise how can I fix the security problem ?
thx
Jack Zhou
Ranch Hand

Joined: Dec 27, 2003
Posts: 93
depends on your programm, when you set a SecurityManager. Your programm's access to system resource will be checked against your security policy normally decided by a file $(JAVA_HOME)/jre/lib/security/java.policy.
e.g. If you want to read a file then you need proper FilePermission to be set up in the policy file. So make sure you configure your policy file so that your program's access is allowed.


Thanks,<br />Jack Zhou<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS,SCEA
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: RMI security problem
 
Similar Threads
AccessControlException hocuspocus
Deployment of EJBs on JBoss [$Proxy92 ??]
RMI: net.ConnectException
rmiregistry running in SCJD
using LocateRegistry.getRegistry(), Exception