In the utility
package as shown in the snapshot, there is a class Constants
. In the same directory as of utility
there is a folder
called sounds
, also shown in the snapshot. Till now I have been giving the complete path of the .wav
files.
Like W:/UnderTest/Blaah/Blaaaaah/Foo/sounds/file.wav
How should I give the path, so that when I make a .jar
file of it, the sound still works. I tried this :
../sounds/Player_1.wav
but it doesn't work and I get java.io.FileNotFoundException: ..\sounds\Player_1.wav (The system cannot find the path specified)