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 234967 - "Run File" does not work as it should in a JavaFX project
Summary: "Run File" does not work as it should in a JavaFX project
Status: RESOLVED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.4
Hardware: PC Windows Vista
: P3 normal (vote)
Assignee: Roman Svitanic
URL:
Keywords:
: 236626 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-08-25 11:51 UTC by terje7601
Modified: 2013-10-02 07:38 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description terje7601 2013-08-25 11:51:58 UTC
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
Comment 1 Lou Dasaro 2013-09-04 18:18:48 UTC
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(?).
Comment 2 Roman Svitanic 2013-09-16 13:00:44 UTC
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.
Comment 3 Roman Svitanic 2013-10-02 07:38:48 UTC
*** Bug 236626 has been marked as a duplicate of this bug. ***