Completely puzzled. I do:
URL resource = this.getClass().getResource("eye-visible.png");
and the URL evaluates to null. "eye-visible.png" is a file in the same package as my class, which is "Controller.java":
I also tried (actually I started with this):
InputStream inputStream = Controller.class.getResourceAsStream("eye-visible.png");
and this returns null as well.
Really stuck - any clue??
This is a modular project and I run on the JDK14. I use NetBeans for an IDE. The lines above are in the start method of a JavaFX application. I reproduced the same null output with the lines above, in a new java project that has just a main class: same effect.