I’m using Eclipse to make a game, and have some graphics stored in a package. It runs fine in Eclipse, but if I make an executable jar, none of the jpg graphics show. Help! Also tell me what info you need, as I don’t know.
you will have to add the images to the Jar aswell, but i guess you did know that 
Some questions:
- where are your images
- how do you load the images (code snippet prefered)
- how do you create your ja
- have you read the space invaders tutorial
-
where are your images - example: Space Rocks.java(project)/resourceHolder(package)/Ship1.jpg(image)
-
how do you load the images (code snippet prefered)
ImageIcon ShipA = new ImageIcon("resourceHolder/Ship1.jpg");
-
how do you create your jar - Eclipse, export project as jar, settings: see attached (can also see file structure in background)
-
have you read the space invaders tutorial - yes, but after i wrote this
Thanks for replying!
don’t know if you figured it out by now, but you have to put that images into jar also. If you use resource package (a jar), you need to put resource jar into game jar and add it to classpath when executing game jar
How do you do that with Eclipse?
I don’t know, I do it from command line
Ok, can you write an example for what the command line should look like?
So much for the spoon-feeding… just google it, please!
If you want to develop a game, it’s important that you can solve your own problems. If you get stuck trying, we’re here to help you, but you don’t seem to be stuck yet.
http://www.google.com/search?q=create+jar
http://www.google.com/search?q=add+jar+to+classpath
http://www.google.com/search?q=the+java+tutorial