0

I created a project wich contains a simple window with graphic contents using scene builder (FXML), I got this error:

here a capture of the code:

code capture

java.lang.IllegalStateException: Location is not set.
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2434)
at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2409)
at application.Main.start(Main.java:16)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
at java.lang.Thread.run(Thread.java:745)
Amira Bedhiafi
  • 8,088
  • 6
  • 24
  • 60
Amine Kaabar
  • 65
  • 1
  • 8
  • 1
    Don't post code as images. https://meta.stackoverflow.com/questions/285551/why-not-to-upload-images-of-code-on-so-when-asking-a-question – James_D Jun 11 '17 at 15:56

1 Answers1

0

change the view loader to (line 14) :

final FXMLLoader fxmlLoader = 
new FXMLLoader(this.getClass().getResource("/MaScene.fxml");
Bourbia Brahim
  • 14,459
  • 4
  • 39
  • 52