• 0

Java Game Images


Question

This is my project:

bin/*blah*

src/Game.java

res/images/blah*.png

I am using Eclipse.

1. When I want to access files/images, I have to do "res/images/blah.png" or "res/maps/map.txt". However when I look at the bin folder, I see that the images folder from res has been copied. Thus I would assume ImageIcon("images/blah.png").getImage() would work. But it fails. Anyone know why?

2. When I execute the game with Eclipse, it runs! However, when I make an executable JAR file, it doesn't work. Why? It can't find "res/map/blah.txt". Is there any way for both Eclipse and a JAR file to work without changing the paths in the source?

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.