title: JavaFX 2 Media from file with a relative path
body: <p>I'm trying to create a JavaFX 2 Media Instance with a relative path (in Eclipse). I've tried it by writing this:</p>
  
  <pre><code>Media media= new Media("file://test.flv");
  </code></pre>
  
  <p>This gives me a MediaException of type MEDIA_INACCESSIBLE. The file I'm trying to load is located in my eclipse project root folder.</p>
  
  <p>I am aware of the answer to this question <a href="https://stackoverflow.com/questions/10062270/how-to-target-a-file-a-path-to-it-in-java-javafx">How to target a file (a path to it) in Java/JavaFX</a> but this only covers loading a file with an absolute path or as a resource.</p>
  
  <p>Thanks </p>