Hey,
I just finished the alpha of my project and wanted to export it as a runnable .jar file.
To do this, I click on File -> Export…, select "runnable .jar file"and click “next”.
Now, I select the Launch configuration and select an export destination. I accept it and export the .jar file.
After this, I ran the .jar, and it worked a bit. Everything’s alright but the images and sounds. I don’t see any images and don’t hear any sounds. Things(rectangles etc.) I drew using Graphics class are shown.
That’s the way I load the Images:
try {
skin = ImageIO.read(new File("res/guys/" + skinname +".png"));
} catch (Exception e) {System.out.println("eror loading skin at guy.java");}
That’s the java project.
http://i.epvpimg.com/6bt1c.png
The .jar looks like this:
org
|
+---> eclipse --> jdt --> internal --> jarinjarloader --> some classes ;)
META-INF
|
+---> MAINFEST.MF
com
|
+---> companyname --> projektname --> my classes
I don’t know where to place the resources. How can I handle and solve this problem?