I am developing an application with JavaFX but I have an error when I try to load an fxml interface containing a JFXDatePicker. The other interfaces load without problem

Here is the error message:

Caused by: java.lang.IllegalAccessError: superclass access check failed: class com.jfoenix.controls.behavior.JFXGenericPickerBehavior (in unnamed module @0x534cfe42) cannot access class com.sun.javafx.scene.control.behavior.ComboBoxBaseBehavior (in module javafx.controls) because module javafx.controls does not export com.sun.javafx.scene.control.behavior to unnamed module @0x534cfe42 

I use JDK 11 With jfoenix 9.0.9

I tried to change my jdk version but without success

5

2 Answers

Run -> Edit Configuration -> Modify option -> Add VM option ->

--add-exports= --add-exports= --add-exports= --add-exports= 
1

For anyone else using SceneBuilder, I added this to app/build.gradle file:

 doFirst { jvmArgs += ['--add-opens= ] jvmArgs += ['--add-exports= ] jvmArgs += ['--add-exports= ] jvmArgs += ['--add-exports= ] jvmArgs += ['--add-exports= ] jvmArgs += ['--add-exports= ] if (javafx.platform.classifier == 'linux') jvmArgs += '-Djdk.gtk.version=2' } 

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.