How to link javafx dependency from maven to Run Configuration VM-options.
Answered
I get the following error:
Caused by: java.lang.IllegalAccessError: class com.sun.javafx.fxml.FXMLLoaderHelper (in unnamed module @0x79055bfd) cannot access class com.sun.javafx.util.Utils (in module javafx.graphics) because module javafx.graphics does not export com.sun.javafx.util to unnamed module @0x79055bfd

I got all the javafx libraries from maven:

In the code there is no error from IntelliJ, only when I compile:

All the fixes I run into, tell me I have to add the JavaFX Library to the VM options, but nobody tells me how to do it when JavaFX is imported from maven and not manually added as a library.


Please sign in to leave a comment.
Check the related answers:
https://stackoverflow.com/questions/52906773/intellij-idea-error-javafx-runtime-components-are-missing-and-are-required-t
https://stackoverflow.com/questions/52467561/intellij-cant-recognize-javafx-11-with-openjdk-11
You need to specify these modules in the --module-path option or have a valid module-info.java defining the modules.