| Author |
access denied java.io.FilePermission
|
Mari Wessels
Greenhorn
Joined: Jun 19, 2002
Posts: 10
|
|
Hi! I'm trying to get my RMI to work. I have a policy file which grants all permissions, looks like this: grant codeBase "http://marie:1099/Developer/scjd/starting/-" { permission java.security.AllPermission; permission java.io.FilePermission "<<ALL FILES>>", "write, read, delete, execute"; permission java.security.SecurityPermission "getPolicy"; permission java.security.SecurityPermission "setPolicy"; permission java.io.SerializablePermission "enableSubclassImplementation"; permission java.io.SerializablePermission "enableSubstitution"; permission java.net.SocketPermission "marie:1099-", "accept, connect, listen, resolve"; }; It sits in my jdk bin, yet I still get a write exception, saying I don't have access to write. The file exists and I can read it, but I can't write to it (tested for that.) Anybody have any ideas? I'm pretty desparate here!!!
|
SCJP2<p>"Don't be afraid to try something new, remember amatuers built the ark, professionals built the Titanic!"
|
 |
Michael Morris
Ranch Hand
Joined: Jan 30, 2002
Posts: 3451
|
|
Hi Mari,
If you want your policy file to grant full permission why don't you just do this:
It sits in my jdk bin, yet I still get a write exception, saying I don't have access to write. The file exists and I can read it, but I can't write to it (tested for that.)
How does your application know to use it? You should include it on the command line like this: Hope this helps, Michael Morris
|
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
|
 |
Mari Wessels
Greenhorn
Joined: Jun 19, 2002
Posts: 10
|
|
Thanks! Removed the codebase line from the policy file and it worked a charm. Mari.
|
 |
 |
|
|
subject: access denied java.io.FilePermission
|
|
|