Javafx Jfoenix Runtime Error (Jfxdatepicker)

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

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.

Alexander Ross

Alexander Ross

Gaming, Esports & Interactive Media Writer

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.

Share this article
Twitter Facebook Pinterest