This problem has probably been posted before but I couldn't find it in the beginner forums..sorry if it has already been answered.
My file structure is simple, I have all of my resource files (images, sounds and configuration files) inside my working directory. To load these files, I use their relative path using URL, for example, to load the images:
URL url = this.getClass().getClassLoader().getResource(fileName);
When I jar all of these files, I end up with something like this (inside the jar):
Model //
java package
GUI // java package, where my main class is located
META-INF
a.jpg
b.jpg
...
...
and my manifest file looks like:
Manifest-Version: 1.0
Main-Class: GUI.Game
The main class gets executed fine, but the images don't show up, so I guess they are not located by my code. Any ideas how the jar file should be so as to fix this problem?
Thanks.