By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,782 Members | 1,154 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,782 IT Pros & Developers. It's quick & easy.

java.security.AccessControlException

P: 19
hi..
i'm using msaccess database to retrive the data into an applet...
during runtime i'm getting an error like
java.security.AccessControlException:access denied(java.lang .RuntimePermissionaccessClassInPackage.sun.jdbc.od bc.)

when i'm using the same code using main method it is working properly..
for applet only it is showing this error..
can u please help me in tracing this...
Jan 4 '07 #1
Share this Question
Share on Google+
6 Replies


P: 2
hi..
i'm using msaccess database to retrive the data into an applet...
during runtime i'm getting an error like
java.security.AccessControlException:access denied(java.lang .RuntimePermissionaccessClassInPackage.sun.jdbc.od bc.)

when i'm using the same code using main method it is working properly..
for applet only it is showing this error..
can u please help me in tracing this...
Try to put your code in paint method

public void paint(Graphics g) {
<your code>
}
Jan 4 '07 #2

10K+
P: 13,264
hi..
i'm using msaccess database to retrive the data into an applet...
during runtime i'm getting an error like
java.security.AccessControlException:access denied(java.lang .RuntimePermissionaccessClassInPackage.sun.jdbc.od bc.)

when i'm using the same code using main method it is working properly..
for applet only it is showing this error..
can u please help me in tracing this...
Hi there. Your applet may to be signed for this to work but this is not usually neccessary when the applet is loaded locally. Are you using appletviewer or the browser for loading the applet?
Jan 4 '07 #3

P: 19
i'm using appletviewer
Jan 4 '07 #4

P: 19
cant i have another solution instead of signing an applet?
Even if i write the code in paint method, i'm getting the same exception..
Jan 5 '07 #6

10K+
P: 13,264
cant i have another solution instead of signing an applet?
Even if i write the code in paint method, i'm getting the same exception..
Writing the code in the paint method won't help. You have to sign it or play around with policy files.
Applets are loaded onto browsers and so giving them access to the files on computers they are running on can pose a security risk. Have a look at all the links I gave you and try to understand what they are talking about.
Jan 5 '07 #7

Post your reply

Sign in to post your reply or Sign up for a free account.