private static final String MEDIA_URL =
"file:///d:/dt_32bars_120tribal.wav";
//"file:///d:/Linkin Park - Numb.mp3";
Media media = new Media(MEDIA_URL);
MediaPlayer mediaPlayer = new MediaPlayer(media);
When I use the file:///d:/dt_32bars_120tribal.wav
; the program can work. But when I use the second one: file:///d:/Linkin Park - Numb.mp3
; it cannot work.
After I rename the MP3 as LinkinPark-Numb.mp3
(remove all space), then I use file:///d:/LinkinPark-Numb.mp3
; it can work now.
Does this mean that the Media()
cannot allow space in the file name? but as we all know that sometimes the name of mp3 files contain several space. How can I deal with it?