0

I was following a tutorial to try to get the hang of JavaFX and scene builder as i might use it for a project i intend to build at university, it was working fine until I added the module-info.java after i added that and ran the program I get an error saying

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

Process finished with exit code 1

ive tried searching for the fix to this issue but most of the answers seem to be talking about making sure my VM config is pointing towards my java.fx libary folder which it already is:

--module-path
C:\Users\randomname\OneDrive\Documents\JavaFX\openjfx-17.0.1_windows-x64_bin-sdk\javafx-sdk-17.0.1\lib
--add-modules javafx.controls,javafx.fxml

my project structure is:

https://i.stack.imgur.com/AbmAG.png

and my actual module-info.java looks like this:

module CW {
    requires javafx.graphics;
    requires javafx.controls;
    requires javafx.fxml;



    opens sample;
}

any help would be greatly appreciated

AD_379
  • 1
  • 1
    Also note you should not use the `--add-modules` option if you have `module-info.java` (the file contains that information). – James_D Dec 14 '21 at 20:36
  • 1
    If you are using idea, I suggest you create a new project using the [new JavaFX project wizard](https://www.jetbrains.com/help/idea/javafx.html). If that works, just copy the code from your old project into your new project. – jewelsea Dec 14 '21 at 21:56

0 Answers0