I've created an executable jar file and added all the .wav, .ttf, .png and .class files into the jar. When I run the jar file it works perfectly when the jar file is contained in the folder where all of the other files needed are.
However I am trying to include all the files needed to execute my application properly inside the jar file. I used the command:
jar cvfe App.jar Main *.class *.png *.ttf *.wav
on windows command prompt. When executing the jar file outside the folder which contains all the necessary files listed above, only the image files and class files seem to be included in the jar file, the font files and sound files do not work and the GUI shows a default font and sound does not work either. The stack trace on command prompt prints that all the files needed are being added when i execute the above command but it doesn't seem to work.
*****EDIT******
Heres how I am loading the font.
Font font = Font.createFont(Font.TRUETYPE_FONT, new FileInputStream("C&LBOLD.ttf")).deriveFont(50f);
Heres how I am loading the .wav files:
File waveFile = new File("sounds//berlin.wav");