开发者

Permissions required to create charts with JFreeChart

开发者 https://www.devze.com 2023-03-06 19:02 出处:网络
I\'d like to use JFreeChart to create charts from code running under a security manager. This fails with the error message

I'd like to use JFreeChart to create charts from code running under a security manager. This fails with the error message

java.lang.InternalError: Can't connect to window server - not enough permissions.

If I change my policy file to give the code unrestricted permissions, it works fine开发者_StackOverflow, so the error must be due to some permission missing in my policy. But which one? I tried various AWT-related permissions but nothing seems to work. Is there a way to find out which permissions are missing?


When you start the app , add the following to the jvm arguments - it produces a huge amount of output, but it will point you in the right direction when there are permissions failures.

-Djava.security.debug=access,failure
0

精彩评论

暂无评论...
验证码 换一张
取 消