I have written a java application , and i am using sounds , images which are placed in Sounds and images packages. I am having trouble about this paths.
filePathSounds=getClass().getResource("/Sounds").toString();
// i get the substring because there is file:/C:/JavaProjec....
// i am removing "file:/ "which is 6 characters and getting the proper path
String pathSounds=filePathSounds.substring(6);
public xPlayer k= new xPlayer(pathSounds+"/Bird/cikcik.mp3");
public xPlayer m= new xPlayer(pathSounds+"/Cat/miaw.mp3");
Above codes is how i manage to use relative path thing.. This is actually working when i compile and run using Netbeans.
The Problem is : When i try to make Jar executable file the paths seems don't work i don't get any of my sounds. Basically how should i place the sounds or images so that i can create proper Jar files..
Thanks in advance.