[英]applet does not run in browser
I am very new to Java, just completed a Java fundamentals coarse. 我对Java非常陌生,只是刚完成了Java基础。 already found a lot of answers and help on the diffenrent forums on the web.
已经在网上的不同论坛上找到了很多答案和帮助。 I have designed an Applet with sql db access.
我设计了一个具有sql db访问权限的Applet。 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. 在NetBeans IDE 7.2.1上运行它,它可以100%运行,但是一旦我使用
NetBeans
view命令使用.html
文件运行它,就会收到以下错误。
ä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. 我已经在jre目录的java策略文件中添加了以下几行。
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. 我认为小程序无法从沙箱中打开JDBC连接。 You probably have to sign your applet something like this
您可能必须像这样签署小程序
http://www.qoppa.com/faq/signapplet.htm http://www.qoppa.com/faq/signapplet.htm
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.