| 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
|
 |
 |
|
|
subject: RMI security problem
|
|
|