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.
When trying to run a JavaFX project with JMX, it fails stating that no main class is set. For a JavaFX project there is no option to set the main class and in the project property file, the main class is automatically set to "main.class=com.javafx.main.Main". The error I get pushing the "Run Main Project with Monitoring and Management" button is: "No main class set. To set up main class for a Project, go to Project | Properties and select the main class in the Running Project section" JavaFX: javafx-sdk2.1.1 for Mac Java: 1.6.0_29-b11-402.jdk for Mac.
Unfortunately, "Run Main Project with Monitoring and Management" assumes the SE launch model, which is incompatible with JavaFX launch model. JavaFX always injects com.javafx.main.Main in place of the main class, while the true main class (Application class in FX terms) is never called by the SE launch system. When JavaFX application is run, first the injected Main class attempts to set-up FX running environment and only then it attempts to run the main Application class. There is currently no way of bypassing this mechanism to enable "Run Main Project with Monitoring and Management" in its current form. As this is not a bug but a missing functionality, I am changing the issue from Defect to Enhancement to keep it as request for extending the Monitoring and Management infrastructure to support JavaFX.