I tried to find a way to get an example with javafx to run, but I couldn’t find any.
What works is, to use the dbus to communicate with a qml frontend.
A java application can send and receive messages with java-dbus. This application can be distributed as a native image. A QML app can start this application and interact with it via dbus.
Next time I come up with a good fitting application idea I gonna try to create an example.
As I understand the official store restrictions, such an app wouldn’t be allowed in harbour, as the java app is not a library, but a standalone application.
I added the java-dbus dependency with maven. Maven can be installed by just downloading it from the webpage and setting JAVA_HOME.
I tested the java application with dbus-monitor to listen to the dbus.