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.
|Summary:||It's impossible to run javafx project 2 times simultaneously|
|Product:||javafx||Reporter:||Sergey Grinev <sergius>|
|Component:||Project||Assignee:||Petr Somol <psomol>|
|Issue Type:||TASK||Exception Reporter:|
Description Sergey Grinev 2012-05-06 21:19:18 UTC
Steps to reproduce: 1. Create new JavaFX project in NetBeans 7.1.2 2. Right click on project name and choose "Run" -- app will run normally 3. Repeat without closing first app You will see next error message: init: Deleting: C:\Users\XXX\Documents\NetBeansProjects\JavaFXApplication28\build\built-jar.properties deps-jar: Updating property file: C:\Users\XXX\Documents\NetBeansProjects\JavaFXApplication28\build\built-jar.properties compile: Detected JavaFX Ant API version 1.1 Launching <fx:jar> task from C:\Program Files (x86)\Oracle\JavaFX 2.1 SDK\lib\ant-javafx.jar C:\Users\XXX\Documents\NetBeansProjects\JavaFXApplication28\nbproject\jfx-impl.xml:1805: The following error occurred while executing this line: C:\Users\XXX\Documents\NetBeansProjects\JavaFXApplication28\nbproject\jfx-impl.xml:1230: can't parse argument number: N.B.: worked fine in 7.1
Comment 1 Petr Somol 2012-05-10 13:21:13 UTC
*** Bug 205368 has been marked as a duplicate of this bug. ***
Comment 2 dukke 2012-06-02 16:00:56 UTC
I think this is very important when creating GUI apps. There is a need to compare changes you've made in the UI and without being able to run multiple instances of the app at the same time this process gets more complicated than should be.
Comment 3 Petr Somol 2012-06-05 11:01:32 UTC
Actually this is not a bug, it is in fact missing functionality. The reason is as follows. JavaFX deployment and launch model differs considerably from SE, where Run simply reuses compiled artifacts if there has been no change that would trigger recompilation. However, it has been agreed with the JavaFX core team that FX Projects need to be (re)deployed before every Run/Debug. Every Run/Debug thus calls the FX SDK internal Ant tasks <fx:jar> and <fx:deploy> that create various deployment artifacts in addition to the jar executable. Therefore, as there is no specific support of multiple Run/Debug, there is no specific guarantee as of what happens when FX Project is run several times at once; it may succeed or it may not, depending in what stage the FX Ant tasks are and whether file locks are held or not. This has been the case since the first FX2 support in 7.1, the seemingly different behavior then and now is coincidental. Nevertheless we see the demand for multiple FX Project Run support. This will involve changes in the build/deployment process that would create separate copies of FX Project artifacts for each of the runs (though identical copies) to prevent race conditions. As this change is too far reaching and 7.2 release is too near, I am changing this issue to a TASK to be resolved for next NB release. See also http://wiki.netbeans.org/NB73_FX2_Plan
Comment 4 Petr Somol 2012-08-07 13:03:53 UTC
fixed in jet-main: http://hg.netbeans.org/jet-main/rev/4b5bd0b38e1c Now the functionality is as follows: - by default when running FX project standalone, a temporary copy of dist/ subdir contents is created and the project is run from there. Repeated run is thus run from a separate copy, what prevents file lock clashes. It is possible to run the project, let the running application open, rebuild the project and run it in modified state once more (e.g. to compare). Note however that calling Clean while any number of project instances are running is not supported (Clean attempts to remove all temporary artifacts including all temporary copies of dist/ subdir that are used by the running instances) - by default when running FX project as WebStart or in Browser, temporary dist/ copy is not created and the project is run as before (directly from dist/), i.e., an attempt to run once more fails. However, concurrent run can be switched on by setting the property javafx.enable.concurrent.external.runs=true. This is not done by default to prevent synchronization issues following from the launch of external processes (javaws, browser). - any multiple concurrent project runs can be globally disabled by setting javafx.disable.concurrent.runs=true. This setting disables temporary dist/ copies for all Run-as modes (standalone, webstart, in browser). - debug and profile work as before, there seems to be no use-case for enabling concurrent multiple debugs/profilings of one project.
Comment 5 Quality Engineering 2012-08-10 02:24:51 UTC
Integrated into 'main-golden', will be available in build *201208100001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/4b5bd0b38e1c User: Petr Somol <firstname.lastname@example.org> Log: #212147 - It's impossible to run javafx project 2 times simultaneously
Comment 6 Stepan Zebra 2012-08-27 13:02:44 UTC
verified in trunk
Comment 7 Petr Somol 2012-08-30 17:28:09 UTC
removed 72patch1-candidate keyword as this issue changes build infrastructure too extensively to be considered a patch of an existing one