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.

Bug 138625 - [Mac] AccessControlException when starting JavaFX Script applet
Summary: [Mac] AccessControlException when starting JavaFX Script applet
Alias: None
Product: javafx
Classification: Unclassified
Component: Deployment (show other bugs)
Version: 6.x
Hardware: Macintosh Mac OS X
: P2 blocker (vote)
Assignee: Alexey Butenko
Keywords: RELNOTE
Depends on:
Reported: 2008-06-30 14:15 UTC by Alexandr Scherbatiy
Modified: 2008-11-01 15:04 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Scherbatiy 2008-06-30 14:16:12 UTC
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 access denied (java.lang.RuntimePermission accessClassInPackage.sun.misc)
	at java.lang.SecurityManager.checkPermission(
	at java.lang.SecurityManager.checkPackageAccess(
	at sun.applet.AppletSecurity.checkPackageAccess(
	at sun.applet.AppletClassLoader.loadClass(
	at java.lang.ClassLoader.loadClass(
	at java.lang.ClassLoader.loadClassInternal(
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(
	at com.sun.javafx.runtime.Entry.runtimeProviderLocator(
	at com.sun.javafx.runtime.Entry.deferTask(
	at com.sun.javafx.runtime.Entry.deferTask(
	at javafx.lang.DeferredTask.postInit$(DeferredTask.fx:41)
	at javafx.lang.DeferredTask.initialize$(DeferredTask.fx:33)
	at javafx.application.Applet.init(Applet.fx:78)
Comment 1 Alexei Mokeev 2008-07-09 14:20:14 UTC
From IDE it works. Alexey, please take a look.
Comment 2 Alexey Butenko 2008-07-09 15:34:34 UTC
To get rid of the exception use following command:
>appletviewer Main.html
Comment 3 Alexei Mokeev 2008-07-09 15:38:51 UTC
Worth to document it somewhere. Wiki ?
Comment 4 Alexandr Scherbatiy 2008-07-11 14:21:44 UTC
Comment 5 Alexandr Scherbatiy 2008-07-17 15:40:19 UTC
It is a regression.

The applets  generated from old javafx.gui.Application class run without the AccessControlException:
import javafx.gui.*;

    content: Label{ text: "Application content"}

The applets based on new javafx.application.Application class throws the AccessControlException.
Comment 6 Lark Fitzgerald 2008-07-17 16:47:31 UTC
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.
Comment 7 Lark Fitzgerald 2008-10-31 18:19:49 UTC
No longer reproducible using NBC2 plugin build with SDK 46
Comment 8 Alexandr Scherbatiy 2008-11-01 15:04:33 UTC