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.
There are 2 issues: 1) doing a "Run Project" is required for "Run File" to work 2) for classes with a main method that do not extend javafx.application.Application, it's impossible to do "Run File" A concrete scenario: 1) create a new JavaFX project --> "Run File" on the created Application class doesn't work until after a "Run Project" is done 2) rename the created Application class (using Refactor -> Rename...) --> "Run File" is broken & doesn't work until after a "Run Project" is done 3) add a new class X which extends javafx.application.Application --> "Run File" on class X doesn't work until after a "Run Project" is done 4) add a new class Y which doesn't extend javafx.application.Application but has a main method --> it's impossible to do "Run File" on class Y
I ran the four scenarios with today's DEV build 201309040001 jdk25 OEL 6.2 on AMD and results were identical to reporters. My two cents is that, While scenarios 1,2 and 3 seem like valid bugs, I'm not as sure about scenario 4, because while a JavaFX app must have a valid application class, (and main is more of a stub)... But here, we are running files! So perhaps(?) it should look for main as well(?).
fixed in jet-main: http://hg.netbeans.org/jet-main/rev/92eda6db1827 We may come up with a better solution/fix to this issue in future, but this should solve the problem and now it should be able to run/debug single file from FX project.
*** Bug 236626 has been marked as a duplicate of this bug. ***