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

查看:33
本文介绍了如何解决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 并调用小程序方法在我的项目中获取它时,我的 javascript 控制台上出现 accessControlException.当我尝试读取临时目录下的文件时,我也遇到了同样的异常.

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?

推荐答案

最简单的解决方案就是签署小程序.

Simplest solution is just to sign the applet.

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

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