java.net.URL.toExternalForm() need help because IDE says location is null
my file that I am trying to load (a .png file) is not properly loading because location is null even though it is in the resources folder
⌛ This post has been reserved for your question.Hey @Doggie! Please useor the/closebutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.Close Post
ClassLoader#getResource (or prepend it with a /)File/Path for resources


com/mycompany/... directory structure still needs to match between the code and the location of the filescom/mycompany/... in your code
/src/main/resources in the code/src/main/java