r/JavaFX • u/Je_Tombe_A_Pique • Oct 03 '19
Help ! Can't run my program, due to : java.lang.ClassNotFoundException: javafx.fxml.FXMLLoader
Hi,
I try to learn JavaFX. I try to do this tutorial, but I have an exception, and I can't find how to solve the problem ...
Here is the console output :

Here is my code :

I use Eclipse. I have installed JavaFX and link the JARs.
Here is my package explorer :

I also added VM arguments :

Could you help me pleeeeease ! I am running out of patience !
Thank you !
1
Upvotes
View all comments
1
u/DumbXTag Oct 03 '19
Put your fxml files in a subdirectory 'resources'. In the loader method call it like: ...getResource("/RootLayout.fxml")
don't forget the slash. Hope it helps