frank
08/27/2020, 3:08 PMCaused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected javafx.collections.ObservableList javafx.scene.Parent.getChildren() accessible: module javafx.graphics does not "opens javafx.scene" to unnamed module @6654d7e0Any hint or suggestion of what happens? I'm not an expert in java 9 modules and I don't know if it's bug or I need to add something in jvm args. Environment: TornadoFX2 + Javafx14 and Java14 JVM args : --module-path C:\JDK\javafx-sdk-14.0.2.1\lib --add-modules javafx.controls,javafx.graphics --add-opens=javafx.graphics/javafx.scene=org.controlsfx.controls Sample Code:
label("Sample label") {
graphic = imageview(image) {
fitHeight = 48.0
isPreserveRatio = true
}
}
PD: only fails inside of label DSL block.
PD²: I tried with --add-opens=javafx.graphics/javafx.scene=ALL-UNNAMED but don't work
Solution: I saw that it was calling Gradle :build task before launch my App and need replicate jvmArgs in gradle file.
application {
applicationDefaultJvmArgs = listOf("--add-opens=javafx.graphics/javafx.scene=ALL-UNNAMED")
}