Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.security.AccessControlException: access denied (java.io.FilePermission

843802Aug 12 2004 — edited Aug 23 2004
hi!
i am trying to launch an application using java web start,i created a jar file-containing :all class

files,resource files,a access database,jdbc.obdc.class file.

i then created a jnlp file ,launched the application using web start,i get the following exception in the log

file:-

java.security.AccessControlException: access denied (java.io.FilePermission resources\db.properties

read)

db.properties is afile which my application access,i tried signing the jar file,changing the policy file as

follows:-

grant codeBase "file:/resources/*" {
permission java.security.AllPermission;
};

i also tried using:-

java.security.AccessController.doPrivileged(new java.security.PrivilegedAction()
{
public Object run()
{ // do priv stuff here.
return null; // return whatever you want.
}
});
in my application code.

but i get the same exception ,what should i do?

thanks....
Sudhanshu
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 20 2004
Added on Aug 12 2004
4 comments
230 views