RangeSlider uses inaccessable package com.sun.javafx.scene.control.inputmap.InputMap

Issue #802 new
Matthew-Groth
created an issue
java.lang.IllegalAccessError: class impl.org.controlsfx.behavior.RangeSliderBehavior (in unnamed module @0x1a29e98b) cannot access class com.sun.javafx.scene.control.inputmap.InputMap$Mapping (in module javafx.controls) because module javafx.controls does not export com.sun.javafx.scene.control.inputmap to unnamed module @0x1a29e98b

I'm actually on "9.0.1-SNAPSHOT" and I am running gradle with java 9

I tried to fix this with my project's build.gradle with

run {
    jvmArgs = ["--add-exports","javafx.controls/com.sun.javafx.scene.control=ALL-UNNAMED"]

}

compileJava{
    doFirst {
        options.compilerArgs.addAll([
                "-XDignore.symbol.file=true","--add-exports","javafx.controls/com.sun.javafx.scene.control.inputmap=ALL-UNNAMED"
        ])

    }
    compileJava.options.fork = true
    compileJava.options.forkOptions.executable = "/Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/bin/javac"
}

I also tried --add-opens

run {
    jvmArgs = ["--add-opens","javafx.controls/com.sun.javafx.scene.control.inputmap=ALL-UNNAMED"]

nothing is working. I always get the same error.

Comments (4)

  1. Samir Hadzic

    JDK9 is bringing a lots of changes and not all of our components are compatible.

    Sadly, this seems to be the case here. I do not currently have the bandwidth to investigate this issue right now. You are more than welcomed to dig a little bit and provide some code to resolve this issue and made the RangeSlider fully compatible with Java 9. I'll gladly help you on the way in order to push these changes to ControlsFX.

  2. Log in to comment