package MainClass; import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.stage.Stage; public class Main extends Application { @Override public void start(Stage primaryStage) throws Exception { Parent root = FXMLLoader.load(getClass().getResource("Frame.Menu.fxml")); primaryStage.setTitle("Chuffie"); primaryStage.setScene(new Scene(root,358,397)); primaryStage.show(); } public static void main(String[] args) { launch(args); } } 

Error: at MainClass.Main.start (Main.java:14)

  • Is there anything wrong with the name of the * .fxml file? - Andrey Popov
  • 3
    Give the full stacktrace, I assume that the resource should be addressed as: getClass (). GetResource ("/ Frame.Menu.fxml") - ezhov_da
  • The problem is in the question header. How can other sufferers understand what they mean? - vikttur
  • Try at the beginning of the start method to access via super. - Sergey
  • This is the correct import - Sergey

0