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 269981

Summary: getClass().getResource() bug
Product: java Reporter: FORLoop
Component: ClasspathAssignee: Tomas Zezula <tzezula>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P1    
Version: 8.2   
Hardware: PC   
OS: Windows 10   
Issue Type: DEFECT Exception Reporter:

Description FORLoop 2017-03-04 17:32:12 UTC
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
Comment 1 Tomas Zezula 2017-05-09 06:46:21 UTC
Same as #269982.

*** This bug has been marked as a duplicate of bug 269982 ***