" java.lang.IllegalArgumentException: uri.getScheme() == null! " error using JavaFX to play audio
The constructor for Media requires a URL, so you'd need something starting with http:// or file://
btn.setOnAction(e -> {
Media m = new Media(Paths.get("04.mp3").toUri().toString());
new MediaPlayer(m).play();
});`
See http://docs.oracle.com/javase/8/javafx/media-tutorial/simpleplayer.htm
It also helps that both Path and File objects can be converted to URLs.