java.security.AccessControlException:访问被拒绝(“java.util.PropertyPermission”“java.net.useSystemProxies”“write”)
当我尝试以 jnlp 格式打开 javafx 应用程序时,出现以下异常:
java.security.AccessControlException: access denied ("java.util.PropertyPermission" "java.net.useSystemProxies" "write")
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.System.setProperty(Unknown Source)
at org.jugc.view.JugCMain.<clinit>(JugCMain.java:37)
... 10 more
如何解决此问题?
When I'm trying to open my javafx application in jnlp format I'm getting the following exception:
java.security.AccessControlException: access denied ("java.util.PropertyPermission" "java.net.useSystemProxies" "write")
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.System.setProperty(Unknown Source)
at org.jugc.view.JugCMain.<clinit>(JugCMain.java:37)
... 10 more
How to resolve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您在 JugCMain.java:37 进行什么操作?
从 jnlp/applet 访问系统属性受到安全限制。
所有未签名的 jnlp/applet 都在沙箱中运行,权限有限,以避免损害客户端的工作站。
如果您想使用系统属性,您可能需要对应用程序进行签名,请参阅 http://java.sun.com/developer/Books/javaprogramming/JAR/sign/signing.html
如果您在 JavaFX 项目中使用 NetBeans 7.1,则可以访问
“项目属性->构建->部署”,然后单击选项“请求无限制访问”
what kind of operation are you doing at JugCMain.java:37 ?
Accessing system properties from jnlp/applet are subject to security restrictions.
All unsigned jnlp/applets are being run in sandbox with limited rights to avoid harming client's workstation.
You may want to sign your application if you want to use system propeties, see http://java.sun.com/developer/Books/javaprogramming/JAR/sign/signing.html
If you are using NetBeans 7.1 for your JavaFX project you can just go to
"Project Properties->Build->Deployment" and click option "Request unrestricted access"