当我尝试使用gpdraw时,为什么Java会抛出AccessControlException?

时间:2015-10-06 04:33:24

标签: java exception intellij-idea import

IntelliJ IDEA 14.1.5

所以我使用了File - >项目结构 - >添加JarOrDirectory - >选择了gpdraw.jar(我将其粘贴到与项目相同的文件夹中)。

现在我

时没有引发任何错误
import gpdraw.*;

但是,当我运行它时,我得到了这个异常。不知道该怎么做。

Exception in thread "main" java.security.AccessControlException: access denied ("java.io.FilePermission" "C:\Users\ANISHK~1\AppData\Local\Temp\AppletPage0.html" "read")
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:457)
at java.security.AccessController.checkPermission(AccessController.java:884)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.SecurityManager.checkRead(SecurityManager.java:888)
at java.io.File.isDirectory(File.java:844)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:82)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
at sun.applet.AppletViewer.parse(AppletViewer.java:1121)
at sun.applet.AppletViewer.parse(AppletViewer.java:1092)
at sun.applet.Main.run(Main.java:156)
at sun.applet.Main.main(Main.java:98)
at sun.applet.AppletViewer.main(AppletViewer.java:1275)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)

感谢任何帮助。谢谢!

0 个答案:

没有答案