问题描述:

This question already has an answer here:

  • JavaFX: “Toolkit” not initialized when trying to play an mp3 file through MediaPlayer class

    2 answers

网友答案:

Following worked for me:

public class App extends Application {
    public static void main(String[] args) {
        Application.launch();
    }

    @Override
    public void start(Stage arg0) throws Exception {
        playSong();
        }
    }
}
相关阅读:
Top