This will no doubt be marked as a duplicate but I figured I'd try anyway. I've looked at all the related questions that have been asked, and I've searched online, and I can't seem to find the solution to this issue.
I am trying to use the Java FX diffuseMap to texture a Box. However, when using
PhongMaterial material = new PhongMaterial();
material.setDiffuseMap(new Image(getClass().getResourceAsStream("/Eternity/Images/ice.png")));
b.setMaterial(material);
I get a NullPointerException;
java.lang.NullPointerException: Input stream must not be null
I have tried messing with the filename, paths, different ways of accomplishing the same task (all of which still involved InputStreams) and even copying and pasting the actual file path (using Intellij's Copy File Path button) but I can't seem to solve this issue. It just doesn't seem to have any effect on the error.
Here's a look at the project hierarchy, barring the main project folder.
Any and all help would be greatly appreciated!