Controller returning null in javafx helloworld
问题 So of course I dive straight in to creating a simple example. public class Main extends Application { URL bla = getClass().getResource("/sample.fxml"); @Override public void start(Stage primaryStage) throws Exception{ //If you get weird errors: http://zenjava.com/javafx/maven/fix-classpath.html //but not actually my issue. Example displays fine in intellij. try { FXMLLoader loader = new FXMLLoader(bla); Parent root = loader.load(bla); primaryStage.setTitle("Hello World"); primaryStage