| Author |
Why does AccessControlException happen? Please help me!
|
heo kangwuk
Greenhorn
Joined: Nov 01, 2002
Posts: 1
|
|
To me accessControlException : Access denied(java.io.FilePermission \scjd read) set classpath=; start rmiregistry set classpath=c:\scjd\Server.jar ---------- next -------------- java -Djava.rmi.server.codebase=file://c:\scjd/ -Djava.security.policy=remote.policy suncertify.server.Server c:\scjd\db.db my policy file is grant { permission java.security.AllPermission; }; Because upside policy file becomes error, is not measuring with a toe although it did establishing variously grant { permission java.net.SocketPermission "*:1024-65535", "connect, accept, resolve"; permission java.net.SocketPermission "*:80", "connect, accept"; permission java.io.FilePermission "<>","read, execute, write"; }; I found all forum to catch error, but there was no number of egg at all. Is no there method to solve? Help just
|
kangwuk heo<br />Sun Certified Java 2 Programmer<br />Sun Certified Web Component Developer<br />Sun Certified Java Developer
|
 |
Charles Dupin
Ranch Hand
Joined: Oct 18, 2002
Posts: 94
|
|
Heo, Are you running an applet? In which case the AppletViewer.policy must be: grant { permission java.security.AllPermission; permission java.net.SocketPermission "*", "accept, connect, listen, resolve"; }; Good luck. C.
|
Charles.<br />(SCJD2)
|
 |
Mag Hoehme
Ranch Hand
Joined: Apr 07, 2002
Posts: 194
|
|
Hi Heo, eventually I circumvented all this security stuff by simply *NOT* implementing a security manager - and it worked fine. The only thing you have to take is that the client has all the server stubs in its classpath. Hope this helps.
|
Mag
|
 |
Mag Hoehme
Ranch Hand
Joined: Apr 07, 2002
Posts: 194
|
|
Hi Heo, are you sure that your policy file has "<>" instead of "<<ALL FILES>>"? java.io.FilePermission checks the string for equality: Remember, the security manager won't let you know if something is wrong with the security file itself. Hope this helps.
|
 |
 |
|
|
subject: Why does AccessControlException happen? Please help me!
|
|
|