I am using Eclipse IDE 2020-03 version with Java. I am trying to use FXML, checked some tutorials and steps online and followed them. But I am still getting the following error:
Error occurred during initialization of boot layer java.lang.module.FindException: Module javafx.controls not found
I googled for help. There are a lot of people having the same issue and were able to resolve this issue. But all I've seen is they are using either NetBeans IDE or IntelliJ. Does anybody have solution for Eclipse? Any help would be appreciated.
I followed this tutorial -> https://www.youtube.com/watch?v=bC4XB6JAaoU . Here is what I currently have:
e(fx)clipse 3.6.0 installed from Market Place
"Java Build Path" contains libraries (I was on 15.0, then switched back to 14.0 but the error still exist)
javafs-sdk jar files
"Java Build Path" contains libraries (I was on 15.0, then switched back to 14.0 but the error still exist)
VM Arguments has the following line (pointing library location): --module-path "C:\Users\my_name\Documents\Scene Builder\openjfx-14.0.1_windows-x64_bin-sdk\javafx-sdk-14.0.1\lib" --add-modules javafx.controls,javafx.fxml
I tried to use "-clean" in eclipse.ini file but it didn't help. Matter fact, when I tried to create new simple project and follow all the steps again, Java doesn't even recognize JavaFX.
Thanks!
I also encountered the same issue. My problem originated from the fact that for some reason the javafx sdk library was located under module path instead of the class path in the build configurations. After moving the JavaFX SDK from the module path to the class path the error was fixed.
If this is your case also, you can do fix this by simply right-clicking on the javaFX project folder-> Build Path-> Configure Build Path-> Select JavaFX SDK-> Remove library-> Select classpath -> add library-> user library-> select library-> apply.
Essentially it should look like this:

A great tutorial to help me set up was found on here
Hope that this helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With