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 209589 - Cannot "Run Main Project with Monitoring and Management" for JavaFX project.
Summary: Cannot "Run Main Project with Monitoring and Management" for JavaFX project.
Status: NEW
Alias: None
Product: javafx
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.1.1
Hardware: Macintosh (x86) Mac OS X
: P3 normal (vote)
Assignee: Roman Svitanic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-14 16:31 UTC by JimClarke
Modified: 2013-09-04 13:46 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description JimClarke 2012-03-14 16:31:39 UTC
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.
Comment 1 Petr Somol 2012-10-24 10:27:07 UTC
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.