1. , if you want to load media from a path relative to your file , you need to use resource loading. No one can be sure of their location. .java/.class
.toExternalForm(), - :
Media media= new Media(getClass().getResource("test.flv").toExternalForm());
2., workdir , :
Media media = new Media(new File("test.flv").toURI().toString());