title: Set the path for the location of media files in program
body: <blockquote>
  <p><strong>Possible Duplicate:</strong><br />
  <a href="https://stackoverflow.com/questions/218061/get-the-applications-path">Get the application's path</a></p>
  </blockquote>
  
  <p>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:</p>
  <pre><code>C:/users/Dell/My Documents/NetBeansProjects/Media/src/resources/MediaFiles/ddd.mpg
  </code></pre>
  <p>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.</p>
  <p>So, please provide me a solution of how to set the <strong>default path</strong> 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.</p>
  <p>How to set the path for the location of media files in program?</p>
  <h3>Update</h3>
  <p>The videos are in the jar file.</p>