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

Summary: JavaFX Maven getResource invalid URI
Product: javafx Reporter: frankv
Component: Visual Tool IntegrationAssignee: Roman Svitanic <rsvitanic>
Severity: normal    
Priority: P3    
Version: 8.0.1   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

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".