I need to get res folder to compile when I export a executable jar file in eclipse also when I use the getClass().getResource()
method it doesn't work.
Current reading image code
public Image loadImage(String fileName) {
return new ImageIcon(fileName).getImage();
}
Code that doesn't work
public Image loadImage(String fileName) {
return new ImageIcon(getClass().getResource(fileName).getImage();
}