如何解决java.security.AccessControlException? [英] How to solve java.security.AccessControlException?

查看:904
本文介绍了如何解决java.security.AccessControlException?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过我对我的Web项目的小程序访问客户端的临时目录。结果
当我本身运行小程序,它得到了 TEMPDIR 没有问题。

I am trying to access client's temp directory through my applet on my web project.
When I run the applet by itself, it gets the tempdir with no problem.

当我设法得到它在我的项目中使用JavaScript和调用applet的方法,我有的AccessControlException 我的JavaScript控制台上。我也是得到同样的异常,当我尝试阅读temp目录下的文件。

When I try to get it on my project using javascript and calling the applet method, I am having accessControlException on my javascript console. Also I am getting the same exception when I try to read a file under the temp directory.

这是我所看到的正是:

java.security.accesscontrolexception access denied (java.util.propertypermission java.io.tmpdir read)
java.security.accesscontrolexception access denied (java.io.filepermission read)

如何解决 java.security.AccessControlException

推荐答案

最简单的解决方案只是对Applet签名。

Simplest solution is just to sign the applet.

这篇关于如何解决java.security.AccessControlException?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆