We have a Jar-file. There are 3 folders:
1-st: META-INF
2-nd: resources
3-rd: classes
How
Here's an example:
String path = "resources/something.png";
BufferedImage img = ImageIO.read(getClass().getClassLoader().getResource(path));
To do it in a static context, like in a static initializer block:
String path = "resources/something.png";
BufferedImage img = ImageIO.read(className.class.getClassLoader().getResource(path));