Question Details

No question body available.

Tags

java javafx controlsfx

Answers (1)

Accepted Answer Available
Accepted Answer
December 10, 2025 Score: 4 Rep: 328 Quality: High Completeness: 80%

So after lots of trying and painful packaging turns out the solution was very simple.

By looking into the build script carefully I noticed this difference:

application {
    // ...
    applicationDefaultJvmArgs = [
        '--enable-native-access=javafx.graphics',
        '--add-exports', 'javafx.base/com.sun.javafx.event=org.controlsfx.controls',
    ]
}

jpackage { // ... javaOptions = ['-Dfile.encoding=UTF-8'] // ... }

And well, turns out I was misinterpreting the java options of the jpackage plugin by thinking that those were for jpackage.exe rather than the bundled java itself.

This was causing JavaFX to fail silently (not even an exception) in the packaged version and checks out with the exclusive odd behavior.

So now with:

jpackage {
    //...
    javaOptions = [
        '-Dfile.encoding=UTF-8',
        '--enable-native-access=javafx.graphics',
        '--add-exports', 'javafx.base/com.sun.javafx.event=org.controlsfx.controls'
    ]
}

The sample project works properly, and I think my app will do the same.

NOTE: for anyone seeking reference, I found this slightly old but useful guide https://github.com/controlsfx/controlsfx/wiki/Using-ControlsFX-with-JDK-9-and-above