I am very new to Java, just completed a Java fundamentals coarse. already found a lot of answers and help on the diffenrent forums on the web.
I have designed an Applet with sql db access. Running it on NetBeans IDE 7.2.1, it works 100%, but as soon as i run it with a
.html file with the
NetBeans view command, I get the following error.
äccess denied "java.lang.RuntimePermission" "accessClassInpackage.sun.jdbc.odbc"
I have already added the following lines to the java policy file in the jre directory.
permission java.lang.RuntimePermission "accessClassInPackage.sun.jdbc.odbc", "read";
permission java.lang.RuntimePermission "accessClassInPackage.sun.jdbc.odbc", "write";
permission java.util.PropertyPermission "file.encoding", "read";
permission java.util.PropertyPermission "file.encoding", "write";
what am i doing wrong, or what is required to run the applet in the browser?
I don't think that applets can open JDBC connections from sandbox. You probably have to sign your applet something like this