JavaFX issues with 2 seemingly equivalent projects

Answered

Hi

I get an error "Error occurred during initialization of boot layer , java.lang.module.FindException: Module javafx.base not found".

I have prepared (upload referene 020_10_09_4Ko4fLbfABn6e2kG) two seemingly equivalent projects. TestJavaFX3 gives this error when executing it. TestJavaFX4 works OK. I have built both projects following the instructions in https://www.jetbrains.com/help/idea/javafx.html.

Both projects have the same code and - as far as I can tell - the same configuration (libraries, dependencies, VM options). I just can't spot any difference.

Any idea?

5 comments
Comment actions Permalink

Make sure that path to JavaFX library is specified correctly in Run/Debug configuration:

For some reason, I see only workspace.xml file in your TestJavaFX3 project. Please try to recreate the project from scratch following the guide https://www.jetbrains.com/help/idea/javafx.html .

0
Comment actions Permalink

I was able to determine, that both projects are indeed equivalent. The problem occurs when I move the whole project.

When I have both projects in the folder C:\Users\odiep\Documents\Programs\JavaFX they work fine. When I move the project (as said: doesn't matter which one) to folder higher up, it works too. When I move it to a subfolder like C:\Users\odiep\Documents\Programs\JavaFX\somefolder, it breaks and yields that error message. Is there some relative folder addressing in one of the configurations parameters? I don't suppose that the path is too long overall already?

0
Comment actions Permalink

I am moving projects since I am on the move from one machine to a new machine. I try to just copy over my projects.

 

0
Comment actions Permalink

The error message "java.lang.module.FindException: Module javafx.base not found" means that the path to the JavaFX library in the VM options field in the run configuration is likely to be incorrect. Make sure that the path is valid and try again.

To make the paths management process easier you can add a new path variable in (Settings/Preferences | Appearance & Behavior | Path variables) and use it in Run/Debug configuration. For example:

0
Comment actions Permalink

Hi. I got it working finally with actually removing the VM options that they recommend in https://www.jetbrains.com/help/idea/javafx.html.

I have uploaded the project as 2020_10_13_AMZBHGTW46qdjVYh in case you want to figure out why this works. Otherwise we can consider this thread as closed.

0

Please sign in to leave a comment.