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.
Product Version = NetBeans IDE 8.2 (Build 201609300101) Operating System = Windows 10 version 10.0 running on amd64 Java; VM; Vendor = 1.8.0_112 Runtime = Java HotSpot(TM) 64-Bit Server VM 25.112-b15 Reproducibility: Happens every time Dear developers, This is my first repprt here i dunno how should fill the rest fields. So the bug iis: Create a maven project. Create a package com.test.application Create a Test.java in application package Create an another package com.test.view Create an FXML file in view package Then from Test.java try to acces to get the FXML file in view package with getClass().getResource() For result u get null thats the bug I couldd solve the problem by creating a random .java class in view package then delete it after u created a random .java fiile there the compiler will find the package. Best wishes, David Kecskemeti dxdy421@gmail.com +36709771591
Created attachment 163761 [details] IDE log
The report is filled perfectly. The problem here is in how the Maven handles resources which is very different from the Ant. The "Source Packages" should contain only sources. Maven passes these files to the java compiler, by default it does not copy resources from "Source Packages" into build artefact. The resources should be placed in the "src/main/resources" ("Other Sources"/"src/main/resources"). The maven copies the files from the "src/main/resources" into build artefact. To resolve the problem move the "com/test/view/*.fxml" into the "src/main/resources/com/test/view/".
*** Bug 269981 has been marked as a duplicate of this bug. ***