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.

 

0

Please sign in to leave a comment.