[英]java.security.AccessControlException: access denied when running applet on browser
I am getting the following error when trying to run an applet in a browser. 尝试在浏览器中运行小程序时出现以下错误。 The applet in question contains file access code in it:
有问题的小程序中包含文件访问代码:
java.security.AccessControlException: access denied (java.lang.RuntimePermission getenv.RGENGINEJAVA) at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at java.lang.System.getenv(Unknown Source) at com.socp.components.SOCPMapViewer.bootstrapArcobjectsJar(SOCPMapViewer.java:668) at com.socp.components.SOCPMapViewer.init(SOCPMapViewer.java:130) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Exception: java.security.AccessControlException: access denied (java.lang.RuntimePermission getenv.RGSENGINEJAVA)
java.security.AccessControlException:访问被拒绝(java.lang.RuntimePermission getenv.RGENGINEJAVA)在java.security.AccessControlContext.checkPermission(未知源)在java.security.AccessController.checkPermission(未知源)在java.lang.SecurityManager.checkPermission (未知源)在java.lang.System.getenv(未知源)在com.socp.components.SOCPMapViewer.bootstrapArcobjectsJar(SOCPMapViewer.java:668)在com.socp.components.SOCPMapViewer.init(SOCPMapViewer.java:130)在sun.plugin2.applet.Plugin2Manager $ AppletExecutionRunnable.run(未知源)处,java.lang.Thread.run(未知源)处的异常:java.security.AccessControlException:访问被拒绝(java.lang.RuntimePermission getenv.RGSENGINEJAVA)
The applet works fine when invoked from the Elipse IDE but when I use an HTML file to run it in a browser it gives the above shown error. 从Elipse IDE调用时,该applet正常运行,但是当我使用HTML文件在浏览器中运行该applet时,出现上述错误。 Please help me to resolve this issue.
请帮助我解决此问题。 Tell me how I can grant the following permission file in the HTML context:
告诉我如何在HTML上下文中授予以下权限文件:
grant {
permission java.security.AllPermission;
};
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.