Reputation: 4104
I updated to 1.7.0_67-b01
and now it seems I can't embed a JavaFX panel in my swing application.
This is the exception I get.
Anyone knows a workaround?
java.security.AccessControlException: access denied ("java.util.PropertyPermission" "javafx.macosx.embedded" "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 javafx.embed.swing.JFXPanel$1.run(Unknown Source)
at javafx.embed.swing.JFXPanel$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at javafx.embed.swing.JFXPanel.initFx(Unknown Source)
at javafx.embed.swing.JFXPanel.<init>(Unknown Source)
at webview.WebBrowserFX.<init>(WebBrowserFX.java:38)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at baf.ui.WebView.initializeFXWebView(Unknown Source)
at baf.ui.WebView.<init>(Unknown Source)
at mypackage.MyClass.<init>(Unknown Source)
Upvotes: 0
Views: 180
Reputation: 7461
You should modify your policy file ($JAVA_HOME/jre/lib/security/javaws.policy
) to include permissions to write this property. So, you should add this line to javaws.policy
:
permission java.util.PropertyPermission "javafx.macosx.embedded", "write";
It seems to be the old bug
Upvotes: 1