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 248080 - JavaFX Maven getResource invalid URI
Summary: JavaFX Maven getResource invalid URI
Alias: None
Product: javafx
Classification: Unclassified
Component: Visual Tool Integration (show other bugs)
Version: 8.0.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Roman Svitanic
Depends on:
Reported: 2014-10-21 18:53 UTC by frankv
Modified: 2015-02-13 13:52 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description frankv 2014-10-21 18:53:15 UTC
The default project includes the line 

        Parent root = FXMLLoader.load(getClass().getResource("/fxml/Scene.fxml"));

in MainApp's start method.

This causes the program to crash due to an invalid URI when it is run from an executable jar.

The following line *does* work:

    Parent root = new FXMLLoader().load(getClass().getResourceAsStream("/fxml/Gui.fxml"));

If the .fxml file includes a Stylesheet, that will also cause the program to crash due to an invalid URI.
Comment 1 Roman Svitanic 2015-02-13 13:52:34 UTC
Newly created Maven FX project can be run without any problems, resolving as "works for me".