Quick question, gents:
I'm trying to get a simple mp3 to run while my program runs, through this:
Media med = new Media("file://C:/Users/hariklia-elsa/workspace/PokerApp/src/intro.mp3"); MediaPlayer mPlayer = new MediaPlayer(med); mPlayer.play();
But I'm running into problems. Running the program terminates with exception
Exception in thread "main" MediaException: MEDIA_INACCESSIBLE : C, with reference to the first line of the code segment above, the one calling the Media() constructor.
I've had no previous experience with javafx or playing media in code, would anyone have any idea on why it would deem the file inaccessible? Am I doing anything simple incorrectly?
The file is, of course, fine. I can open it in a myriad different media players and it's fine.
This way it will work:
Media med = new Media("file:///C:/Users/hariklia-elsa/workspace/PokerApp/src/intro.mp3");
Note 3 slashes after