Given that the folder res
is defined as a resource folder in your project and put on class path (and indeed, contains the file sprite_sheet_test.png
), this should work:
loader.loadImage("/sprite_sheet_test.png");
Note the leading /
, to make sure the image is loaded from the resource root. Without it, the resource would be resolved relative to the package of your BufferedImageLoader
class.