Closed AlperGuven closed 4 years ago
I get the same error when trying to run the modular project with Intellij IDE.
The issue seems to be that getClass().getResource("scene.fxml")
in MainApp.java return null
Now I see the problem, I think. When I compile with Javafx library (javafx:compile), its compile properly, and run with again javafx library (javafx:run) application is run without problem. I guess, Maven compiler did not recognize some feature of javafx or problem with getResource function path variable. So, i did not understand the situtation but now FMXLoader is runnig without problem.
I compile project with Maven compiler:compile, after that i want to run project with javafx:run. Then error comes up: Caused by: java.lang.IllegalStateException: Location is not set. at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2459)
I do not know why but project didn't see the ".fxml" files.