FXMLLoader.load throws java.lang.IllegalAccessError #548
Comments
The following is suspicious:
The @jperedadnr or @abhinayagarwal might be able to comment on this. |
The issue here is with how IntelliJ IDEA handles a Java application with JavaFX dependencies. The following java command is executed by IntelliJ IDEA when a JavaFX 11+ application with OP's
It adds Solutions
|
Also faced this issue. |
I think we should |
Caused by: java.lang.IllegalAccessException: class com.sun.javafx.application.LauncherImpl (in module javafx.graphics) cannot access class checkersFX.Main (in module CheckersFX) because module CheckersFX does not export checkersFX to module javafx.graphics |
This is not the same issue discussed above. It is an application error. See https://openjfx.io/javadoc/14/javafx.graphics/javafx/application/Application.html and look for "Deploying an Application as a Module". |
Thank you |
Caused by: java.lang.IllegalAccessException: class javafx.fxml.FXMLLoader$ValueElement (in module javafx.fxml) cannot access class UXUI.MainMenuController (in module src) because module src does not export UXUI to module javafx.fxml Really not sure what's going on here, any help appreciated! |
Hey ! I fixed this problem by adding the configuration parameters : |
I am using Intellij (JavaFX with Maven module), after adding the javafx plugins I get the following error:
Exception in Application start method
it is happening on:
Parent root = FXMLLoader.load(getClass().getResource("/sample.fxml")); // The sample.fxml is in the resources folder
Here is my maven pom file:
The text was updated successfully, but these errors were encountered: