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 226155 - Add project classpath to scenebuilder classpath
Summary: Add project classpath to scenebuilder classpath
Status: NEW
Alias: None
Product: javafx
Classification: Unclassified
Component: Visual Tool Integration (show other bugs)
Version: 8.0
Hardware: PC Linux
: P3 normal with 5 votes (vote)
Assignee: Roman Svitanic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-15 08:13 UTC by pablopina
Modified: 2016-10-17 16:21 UTC (History)
2 users (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 pablopina 2013-02-15 08:13:51 UTC
If an fxml contains custom components from either the project or a jar in the classpath scenebuilder prompts the user to enter the jars or directories for the not found classes. 

Would be better if nb could pass the project classpath jars and directories to scenebuilder when opening an fxml file from NB... Wouldn't it?
Comment 1 pablopina 2013-02-15 08:15:59 UTC
At least for maven projects
Comment 2 Marian Mirilovic 2013-02-15 13:34:52 UTC
Definitely not P1 (stopper), I would even say it's an enhancement ... Peter, please evaluate. Thanks in advance.
Comment 3 Petr Somol 2013-02-15 20:29:33 UTC
(In reply to comment #2)
> Definitely not P1 (stopper), I would even say it's an enhancement ... Peter,
> please evaluate. Thanks in advance.

Yes, it is not a defect but a feature request. It does not concern NetBeans only but also the SceneBuilder side. I have consulted the SceneBuilder team and we agreed that SceneBuilder in its standalone form will not support this; this issue will be sorted out as part of the planned future SceneBuilder integration into NetBeans. Preparatory works on this will start in NB8 timeframe but probably will not be finished for NB8.0 as the necessary APIs on SceneBuilder side will not be finalized at the time of NB8.0 release. This issue will thus be targeted to be addressed in NB and SB release just after NB8.0.
Comment 4 mwisnicki 2013-08-26 22:56:59 UTC
But it can be trivially worked around in NetBeans:

Right now SceneBuilder.exe just runs

"C:\Program Files\Java\jre7\bin\javaw.exe"
-da
-Djava.util.logging.config.file="C:\Program Files\Oracle\JavaFX Scene Builder 1.0\bin\logging.properties"
-classpath "
C:\Program Files\Oracle\JavaFX Scene Builder 1.0\bin\..\lib\SceneBuilder.jar;
C:\Program Files\Oracle\JavaFX Scene Builder 1.0\bin\..\lib\jfxrt.jar;
C:\Program Files\Oracle\JavaFX Scene Builder 1.0\bin\..\lib\javafx-beans-dt.jar;
C:\Program Files\Oracle\JavaFX Scene Builder 1.0\bin\..\lib\javafx-designtime.jar
"
com.oracle.javafx.authoring.Main
"D:/devel/projects/fxapp/launcherfx/src/main/resources/fxml/hello.fxml"

All it takes to fix it is generate and run this command with extra classpath entries.

This shouldn't take more than few lines of code and would make many users happy.
Comment 5 pablopina 2014-04-26 06:59:17 UTC
Yes, this is essential for working with scenebuilder.
Comment 6 simon.watts 2016-10-17 16:21:51 UTC
Integrating the project's classpath into Scene Builder is essential if you are doing anything more than a trivial interface.

We've got a small distance by importing the Project's dist JAR into Scene Builder's import library... but these do not appear to be added to Scene Builder's classpath, and so fail to load controls which expose elements of other supporting libraries.  (In addition the META-INF data from the JAR is not processed).

This means we either have to define out interfaces in terms of JavaFX "raw" controls, or face hand-editing the FXML afterwards - which then cannot be loaded by Scene Builder, and somewhat defeats the point of it all.

Note also that Scene Builder (8.2.0, 2016-05-18) fails to start from NetBeans 8.1 when custom controls are present in the FXML.  Starting a stand-alone copy works, and starting a stand-alone copy in the background allows the invokation from NetBeans to work...