Instructor Fang: Today I debugged your jdbcupdateapplet Program .You can directly use IE to open the runapplet.html file. java. Security. accesscontrolexception: Access Denied will be reported on the Java console.
(Java. Lang. runtimepermission accessclassinpackage. Sun. JDBC. ODBC) error. This error message is also displayed here! Based on the analysis of related problems found on the Internet. this is because the applet is not allowed to obtain system resources. at the same time, the error message requires a runtimepermission, which will allow the applet to obtain sun. JDBC. ODBC package. therefore, you can modify a secure file in the Java runtime package of your system. the specific method is: Find the JRE package used by your IE browser. My home is: D:/program files/Java/jre1.6.0/lib/security. There is a Java under this package. policy file, open and edit it: Add two statements in grant: Permission Java. lang. runtimepermission "accessclassinpackage. sun. JDBC. ODBC ";
Permission Java. util. propertypermission "file. encoding "," read "; Disable IE and run it again to solve this problem. I added the above error message to my host at home. add the second statement because the applet can read some binary files. otherwise, Java. security. accesscontrolexception:
Access denied (Java. Lang. runtimepermission
File. Encoding read)
Error. The solution comes from an online discussion: http://java.sun.com/developer/onlineTraining/Programming/BasicJava1/dba.htmlhttp://www.javaworld.com.tw/jute/post/view? Bid = 29 & id = 71700 & TPG = 1 & PPG = 1 & sty = 1 & age = 0 these two addresses discuss and analyze this issue.