Everytime I put my Game I’m making into a jar every single Image loads except for the map, I know it’s in the correct case and everything it just won’t load, someone take a look at my code and tell me what I’m doing wrong in this?
import java.awt.Graphics;
import java.awt.Image;
import java.awt.Toolkit;
public class map {
Image map;
String mp;
public static int x = 0;
public static int y = 0;
public map(String mp) {
this.mp = mp;
map = Toolkit.getDefaultToolkit().getImage(this.getClass().getResource(mp));
}
public void paint(Graphics g) {
g.drawImage(map, x, y, null);
}
}
then I make a new Object with it
public static map map = new map("images/Map2.png");
then later…
map.paint(g);
What do I have to do to make it paint?? I’ve looked all around the web and the question never gets answered