0

I am trying to read in an Mp4 file as a starter to learning JavaFX but cannot get the path correct:

public class Main extends Application {

@Override
public void start(Stage primaryStage){
    Player player = new Player("file:/home/dave/Player/src/resources/small.mp4");

and the error is:

Exception in Application start method
Exception in thread "main" java.lang.RuntimeException: Exception in Application start  method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:875)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$147(LauncherImpl.java:157)
at com.sun.javafx.application.LauncherImpl$$Lambda$1/142257191.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)
Caused by: MediaException: UNKNOWN : com.sun.media.jfxmedia.MediaException: Could not create player! : com.sun.media.jfxmedia.MediaException: Could not create player!

I'm using Linux (Ubuntu) with IntelliJ and JDK 8. I'm sure this is simple one.

Steerpike
  • 1,712
  • 6
  • 38
  • 71

0 Answers0