This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JNLP and Web Start and the fly likes AccessControlException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "AccessControlException" Watch "AccessControlException" New topic
Author

AccessControlException

Sudhanshu Techie
Greenhorn

Joined: Aug 12, 2004
Posts: 4
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: AccessControlException
 
Similar Threads
AccessControlException using custom ClassLoader with WebStart
Tomcat's default classpath??
FileNotFoundException - Access Denied
Accessing third party jars by an application using Java Web Start
AccessControlException with a custom ClassLoader