This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Steps to reproduce: - Create a JavaFX Script file: ------------------------------------------------- import javafx.application.Application; import javafx.ext.swing.Canvas; import javafx.scene.geometry.Ellipse; import javafx.scene.paint.Color; Application { content: Canvas { content: [ Ellipse { centerX: 100, centerY: 100 radiusX: 40, radiusY: 15 fill: Color.GREEN } ] } } ------------------------------------------------- - Invoke 'Run Applet' from a context menu Applet starts - Go to the project directory, dist folder > appletviewer Main.html java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.misc) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264) at java.security.AccessController.checkPermission(AccessController.java:427) at java.lang.SecurityManager.checkPermission(SecurityManager.java:532) at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1512) at sun.applet.AppletSecurity.checkPackageAccess(AppletSecurity.java:263) at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:116) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:164) at com.sun.javafx.runtime.Entry.runtimeProviderLocator(Entry.java:96) at com.sun.javafx.runtime.Entry.deferTask(Entry.java:78) at com.sun.javafx.runtime.Entry.deferTask(Entry.java:69) at javafx.lang.DeferredTask.postInit$(DeferredTask.fx:41) at javafx.lang.DeferredTask.initialize$(DeferredTask.fx:33) at javafx.application.Applet.init(Applet.fx:78) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:613)
From IDE it works. Alexey, please take a look.
To get rid of the exception use following command: >appletviewer -J-Djava.security.policy=../applet.policy Main.html
Worth to document it somewhere. Wiki ?
verified
It is a regression. The applets generated from old javafx.gui.Application class run without the AccessControlException: ------------------------------------------------- import javafx.gui.*; Application{ content: Label{ text: "Application content"} } ------------------------------------------------- The applets based on new javafx.application.Application class throws the AccessControlException.
I spoke with pTeam today and this is a known issue that is being release noted for the preview. If you need this feature for preview then we will need to use the old api. SwingFrame, etc.
No longer reproducible using NBC2 plugin build with SDK 46