Set the path for the location of media files in program
- by Zaheer Boovaji
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:
C:/users/Dell/MyDocuments/NetBeansProjects/Media/src/resources/ MediaFiles/ddd.mpg
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.