Possible Duplicate:
Get the application's path
I have made a Java Swing Desktop application in Netbeans which can play media files I have put the videos in my workspace resources location and in my java program I am calling those media files using an URL which is something like this:
C:/users/Dell/My Documents/NetBeansProjects/Media/src/resources/MediaFiles/ddd.mpg
This works well when I run in my IDE and also i have made Jar for this it works well on my computer but the problem is when i copy this jar file on my friends system the interface is coming but when I click a button to play a media file it says the file does not exist.
So, please provide me a solution of how to set the default path so that when I run a jar file on other systems it should play the media file location I am passing as in my program.
How to set the path for the location of media files in program?
Update
The videos are in the jar file.