InvocationTargetException when running a javafx program

前端 未结 6 1922
野的像风
野的像风 2020-11-30 10:05

So this worked in the example from javafx when My pc had jdk 1.7.0 so this may be the new version of FX in java8 however;

I get a nice stack-trace

jf         


        
6条回答
  •  被撕碎了的回忆
    2020-11-30 10:36

    If Any One does not fix the problem by following answers, The simple way is to create new fxml Empty class then click on edit of the fxml causin the problem and copy the xml code to the new class . Go to the start() methode, change the:

    Pane mainPane = FXMLLoader.load(getClass().getResource("main.fxml"));
    

    to

    Pane mainPane = FXMLLoader.load(getClass().getResource("newClass.fxml"));
    

提交回复
热议问题