我运行我的javafx应用程序时显示错误

时间:2013-10-05 07:22:25

标签: java javafx-2 javafx

我正在尝试使用javafx创建一个videoplayer,但是当我尝试运行该类时,它会显示一些错误

public class MoviePlayer extends Application{


public static void main (String [] args){
launch(args);
}

@Override
public void start(Stage stage) throws Exception {
    Group root = new Group();       
    Media media = new Media("C:\\Users\\goldAnthony\\Videos\\Whistle.mp4");

    MediaPlayer player = new MediaPlayer(media);
    MediaView view = new MediaView(player);

    root.getChildren().add(view);
    Scene scene = new Scene(root, 400, 400, Color.BLACK);
    stage.setScene(scene);
    stage.show();

    player.play();
}

这是它显示的错误

Error: Could not find or load main class Player.VideoPlayer2
Java Result: 1
BUILD SUCCESSFUL (total time: 1 second)

有些人问我说代码工作正常,我真的不知道什么似乎是问题,因为它给出了上面这个错误

0 个答案:

没有答案