How to solve java.security.AccessControlException?

和自甴很熟 提交于 2020-01-21 11:42:10

问题


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.

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.

This is what I see exactly:

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

How to solve java.security.AccessControlException?


回答1:


Simplest solution is just to sign the applet.



来源:https://stackoverflow.com/questions/14650010/how-to-solve-java-security-accesscontrolexception

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!