title: JavaFx MediaPlayer "Could not create player!" error in Ubuntu 14.04
body: <p>I have installed Ubuntu 14.04 and i'm getting an error when i instantiate a MediaPlayer.</p>
  
  <pre><code>package mediatest;
  
  import java.io.File;
  import javafx.application.Application;
  import javafx.event.ActionEvent;
  import javafx.event.EventHandler;
  import javafx.scene.Scene;
  import javafx.scene.control.Button;
  import javafx.scene.layout.StackPane;
  import javafx.scene.media.Media;
  import javafx.scene.media.MediaPlayer;
  import javafx.stage.Stage;
  
  /**
   *
   * @author DESARROLLO
   */
  public class MediaTest extends Application {
  
      @Override
      public void start(Stage primaryStage) {
          Button btn = new Button();
          btn.setText("Say 'Hello World'");
          btn.setOnAction(new EventHandler&lt;ActionEvent&gt;() {
  
              @Override
              public void handle(ActionEvent event) {
                  Media media = new Media(new File("rotate.mp4").toURI().toASCIIString());
                  MediaPlayer player = new MediaPlayer(media);
              }
          });
  
          StackPane root = new StackPane();
          root.getChildren().add(btn);
  
          Scene scene = new Scene(root, 300, 250);
  
          primaryStage.setTitle("Hello World!");
          primaryStage.setScene(scene);
          primaryStage.show();
      }
  
      /**
       * @param args the command line arguments
       */
      public static void main(String[] args) {
          launch(args);
      }
  
  }
  </code></pre>
  
  <p>The problem is when i create the MediaPlayer:</p>
  
  <pre><code>Media media = new Media(new File("rotate.mp4").toURI().toASCIIString());
  MediaPlayer player = new MediaPlayer(media);
  </code></pre>
  
  <p>The Exception message:</p>
  
  <pre><code>Caused by: MediaException: UNKNOWN : com.sun.media.jfxmedia.MediaException: Could not create player! : com.sun.media.jfxmedia.MediaException: Could not create player!
  at javafx.scene.media.MediaException.exceptionToMediaException(MediaException.java:146)
  at javafx.scene.media.MediaPlayer.init(MediaPlayer.java:511)
  at javafx.scene.media.MediaPlayer.&lt;init&gt;(MediaPlayer.java:414)
  at javafxapplication2.FXMLDocumentController.handleButtonAction(FXMLDocumentController.java:34)
  </code></pre>
  
  <p>I have already installed ubuntu-restricted-extras, and all codecs needed to display mp4 videos.
  When i play the video with Vlc or other player, there is no problem.</p>
  
  <p>May it be a JavaFx issue in Ubuntu 14.04?</p>
  
  <p>I have tried with jre-1.8</p>