How do I get images?

How would I get resources in my resources folder?
Note: I’ve tried this, but it didn’t work:

URL image_url = ImageLoader.class.getResource(path);
System.out.println(path); // Prints the file's correct name
System.out.println(image_url); // Prints null

This question has absolutely nothing to do with Gradle.
Please take it to a more appropriate community.

Oh, I’ve never used this in normal Java, thought it was a Gradle thing. Sorry about the confusion!