getClass().getResource() always returning null
问题 I am trying to set the URL of an image that is located in my resource folder in my src folder. It is always setting the URL to null. The image is there and everything is named correctly. What is the issue? Thanks! My file structure: sp1 src resources 01.png Here is my code where I am trying to set the URL for the picture: this.setImagePath(getClass().getResource("/resources/01.png")); And the setImagePath is doing this, I am sure this is not the problem, because I followed the execution and