Hi,
I’ve packaged my applet and all the iamges into a jar file for neatness. However the applet seems to be trying to load the images from outside of the jar rather than inside. meaning that I need to send the images in a folder seperately. Its messy! What am I doing wrong? Heres an example of where I am loading images in my code…
fileName = getClass().getResource("resources/terrain/grass.gif");
GRASS_TILE = Toolkit.getDefaultToolkit().getImage(fileName);
mediaTracker.addImage(GRASS_TILE, 0);
I’ve tried using getCodeBase()+fileName and it doesnt make a difference!! How do I make it use the images in the jar!! lol. Thanks for any help.