javaeclipsejavafxjavafx-8javafx-11

Error occurred during initialization of boot layer java.lang.module.FindException: Module javafx.controls not found


I tried to install and setup JavaFX according to the videos on youtube but I, unfortunately, cannot setup JavaFX :( tried many solutions on the internet, but still doesnt work. There are 2 things which are different on my eclipse.

First is Java build path -> Libraries. My Libraries are not separated as classpath or modulepath.

Java Build Path

Second, when I create JavaFX project, "module-info.java" is being created automatically. I haven't seen this file on any of the videos.

enter image description here

Could any of these be the reason why I get this error? Please help me..


Solution

  • You are using Java 1.8. The Modulepath or the Classpath won't show up if you are using that version. It should show up if you use Java version 11.

    I was having issues with the module-info file autopopulating as well. However, once you get the JavaFX library you create under the Modulepath, the error should disappear.