Ignition 8.1.11 JavaFX

We currently use JavaFX AudioClip extensively through our 7.9x applications.
We are currently moving gateways and applications to the 8.x branch.
In testing I have found that any of our calls to JavaFX are failing with no module named javafx.

What can we do to utilize AudioClip in 8.x?

Ignition now uses its own java, which might not have javafx, you would have to edit some config file to utilize another java source.
Cannot recall which file tho.

Unfortunately @SKA is right, you would have to launch Vision Clients (I assume that’s what you’re talking about) with a custom JRE that includes JavaFX, which will be its own challenge, because most do not. I think I remember reading that Bellsoft Liberica JDK does come with it bundled.

Alternatively you might be able to build a simple module that just includes the necessary JavaFX dependencies. This will work in Vision Client scope because there is no ClassLoader hierarchy there.

Or maybe just dumping JavaFX libraries into lib/core/client will be enough as well. Unfortunately if your clients run on multiple platforms you’ll need the dependency for each platform and that will significantly increase the initial download size. (same caveat applies to the module approach)

1 Like

A Module would be the best long term solution, but we don’t make it easy to distribute OS specific libraries at this point afaik. You could tie into the optional libs system (which is what this theoretical module support would mimic). I think I can whip up an example of this pretty quick. give me a moment.

I made a github Repository which creates a module and emits the required javafx dir you should drop into user-lib/opt on the gateway. See the readme there.

The readme also has a script to confirm that this works in designers and clients, you can just put it on a vision button. Im going to ask a colleague about adding some better support for this directly in the module plugin so you don’t have to copy out to user-lib/opt but this should get you up and running on any windows, mac, or linux x86.

Hope that helps,
Jonathan C