小程序权限被拒绝
全部 我已经签署了所有 jar 文件,包括 appletviewer.jar 。我正在运行最新版本的 JDK 。直到今天下午我都成功地运行和查看了小程序,但现在突然出现了这个异常。我不明白发生了什么...... 请尽快帮助我。
exception: Permission denied: null.
java.lang.SecurityException: Permission denied: null
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.lang.SecurityException: Permission denied: null
Exception in thread "thread applet-applet.EmbeddedViewerApplet.class-3" java.lang.SecurityException: Permission denied: http://localhost:8080/ExtraCare/resources/appletviewer.jar
at sun.plugin.util.GrayBoxPainter.setProgressFilter(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.setupGrayBoxPainter(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.showAppletException(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
谢谢 米希尔·帕雷克 +91 94266 21000。
All
I have signed all the jar files including appletviewer.jar also . i am running latest version of JDK . I was running and viewing applet successfully till today afternoon , but suddenly i am getting this exception now . i can not understand what is happening ...
please, help me asap.
exception: Permission denied: null.
java.lang.SecurityException: Permission denied: null
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.lang.SecurityException: Permission denied: null
Exception in thread "thread applet-applet.EmbeddedViewerApplet.class-3" java.lang.SecurityException: Permission denied: http://localhost:8080/ExtraCare/resources/appletviewer.jar
at sun.plugin.util.GrayBoxPainter.setProgressFilter(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.setupGrayBoxPainter(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.showAppletException(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Thank You
Mihir Parekh
+91 94266 21000 .
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您使用的是火狐浏览器吗?您最近更新到版本 3.6.14 了吗?
看看这个...
https:// /support.mozilla.com/en-US/kb/pogo-and-other-java-pages-dont-work
Are you using FireFox? Any chance you recently updated to version 3.6.14?
Check this out...
https://support.mozilla.com/en-US/kb/pogo-and-other-java-pages-dont-work
您可能希望将调用包装在 doPrivileged 块中。事先,您可能需要对要调用的方法调用 checkPermission。
这里有两篇有用的文章。
http://download.oracle.com/javase /1.4.2/docs/api/java/security/AccessController.html
http ://www.raditha.com/java/sandbox/unsigned.php
但是,如果您使用jnlp部署,System.setSecurityManager(null)应该可以解决您的问题,并且您将拥有您的小程序的更多权限,允许您轻松有效地逃离浏览器沙箱。但请记住,这样做不仅不是一个好的做法,而且实际上会使小程序的用户暴露于恶意代码。
You might want to wrap your calls in a doPrivileged block. Beforehand, you might want to call checkPermission on the method you want to invoke.
Here are two useful articles.
http://download.oracle.com/javase/1.4.2/docs/api/java/security/AccessController.html
http://www.raditha.com/java/sandbox/unsigned.php
However, if you use jnlp deployment, System.setSecurityManager(null) should solve your problems and you will have more privileges of your applet, allowing you to effectively escape the browser sandbox without much hassle. Keep in mind though, that doing so is not only not a good practice, but actually does expose the user of your applet to malicious code.