1

I'm new to java, I'm trying to build a JavaFX Application on eclipse using e(fx)clipse by following a tutorial and did exactly the same, the application is very simple, when I try to compile it I get bunch of errors which I don't even understand :

Exception in Application start method
Exception in thread "main" java.lang.RuntimeException: Exception in Application start method
    at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:403)
    at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:47)
    at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:115)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: Location is not set.
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2021)
    at ch.makery.address.controler.MainApp.start(MainApp.java:29)
    at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
    at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:206)
    at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:173)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
    at com.sun.glass.ui.win.WinApplication$2$1.run(WinApplication.java:67)
    ... 1 more

please can you tell me what I'm missing.

Salah Eddine Taouririt
  • 24,925
  • 20
  • 60
  • 96
AymenDaoudi
  • 7,811
  • 9
  • 52
  • 84
  • This question is answered already: [here](http://stackoverflow.com/a/13806031/2072528) – Kalaschni Apr 23 '13 at 15:12
  • possible duplicate of [Error loading fxml files from a folder other than the bin folder](http://stackoverflow.com/questions/13785919/error-loading-fxml-files-from-a-folder-other-than-the-bin-folder) – jewelsea Apr 23 '13 at 21:31

1 Answers1

0

You have to set the location of the FXML file in your loader, be sure that you are providing the correct PATH to your FXML file.

PS: Netbeans is the best choice for a JavaFX beginner, start Here.

Salah Eddine Taouririt
  • 24,925
  • 20
  • 60
  • 96
  • I got it fixed thanks for the help, concerning NetBeans, indeed it is, but I'm kinda forced to use eclipse, any nice starting up tutorials for JavaFx on Eclipse, I would be tankful – AymenDaoudi Apr 23 '13 at 15:54
  • Oueld Kara is weld 9ahba, I will update my answer later for more tutorial links. – Salah Eddine Taouririt Apr 23 '13 at 15:58
  • Haha I see you got What I meant by "forced to use eclipse", I'm even afraid he won't be pleased by me using JavaFx, thx for the tutorial links anyway – AymenDaoudi Apr 23 '13 at 16:07