title: Play Video in Javafx (Ubuntu)
body: <p>my code id</p>
  
  <pre><code>public class Video1 extends Application {
  
  private static String arg1;
  
  @Override public void start(Stage stage) {
      stage.setTitle("Media Player");
  
  // Create media player
  
      Media media = new Media("/home/ubuntu/NetBeansProjects/VideoPaly/src/videopaly/vid.flv");
  
      javafx.scene.media.MediaPlayer mediaPlayer = new javafx.scene.media.MediaPlayer(media);
      mediaPlayer.setAutoPlay(true);
      mediaPlayer.setCycleCount(javafx.scene.media.MediaPlayer.INDEFINITE);
  
  // Print track and metadata information
      media.getTracks().addListener(new ListChangeListener&lt;Track&gt;() {
  public void onChanged(Change&lt;? extends Track&gt; change) {
              System.out.println("Track&gt; "+change.getList());
          }
      });
      media.getMetadata().addListener(new MapChangeListener&lt;String,Object&gt;() {
  public void onChanged(MapChangeListener.Change&lt;? extends String, ? extends Object&gt;   change) {
              System.out.println("Metadata&gt; "+change.getKey()+" -&gt; "+change.getValueAdded());
          }
      });
  
   // Add media display node to the scene graph
      MediaView mediaView = new MediaView(mediaPlayer);
      Group root = new Group();
      Scene scene = new Scene(root,800,600);
      root.getChildren().add(mediaView);
      stage.setScene(scene);
      stage.show();
  }
  
  public static void main(String[] args) {
  if (args.length &gt; 0) {
          arg1 = args[0];
      }
      Application.launch(args);
  }
  }
  </code></pre>
  
  <p>I want to Play Video From Resource of Ubuntu when i run above code it give error like  java.lang.IllegalArgumentException: uri.getScheme() == null! at line </p>
  
  <pre><code>Media media = new Media("/home/ubuntu/NetBeansProjects/VideoPaly/src/videopaly/vid.flv");
  </code></pre>
  
  <p>any idea about that?</p>