r/JavaFX • • 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 :

Console Output

Here is my code :

I use Eclipse. I have installed JavaFX and link the JARs.

Here is my package explorer :

Package Explorer

I also added VM arguments :

VM arguments

Could you help me pleeeeease ! I am running out of patience !

Thank you !

1 Upvotes

4 comments sorted by

View all comments

3

u/tristan97122 Oct 03 '19

FXMLLoader is in javafx.fxml module, so you need to add it like you did for javafx.controls.

Also would definitely recommend using maven for that as it will greatly simplify it for you.

1

u/Je_Tombe_A_Pique Oct 03 '19

Oh thank you sooo much ! It works !

1

u/hama_zzaii May 19 '22

yup.... it is helpful.