You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a small JavaFX app and researched quite a bit for a reliable way to compile this to native using GraalVM. It's worth noting that the app uses a tiny bit of good old AWT to configure the Taskbar icon.
I've tried a multitude of combinations of:
GraalVM CE (various version)
Gluon Substrate
Libernica NIK
each in combination with:
com.gluonhq:gluonfx-maven-plugin
org.graalvm.buildtools:native-maven-plugin (with and without -Djava.awt.headless=false)
The only working solution (including the tiny AWT piece) is:
JavaFX 23.0.1
native-maven-plugin with jvmArgs -Djava.awt.headless=false
compiled with Libernica NIC 21 (jdk+fx)
I've set this up using Github Actions using the following config:
I'm not quite sure if this is actually a problem with graalvm/setup-graalvm or maybe with the OS image itself or the Libernica NIC but since the setup is identical for all OS I'd naively assume it should work the same for all.
If you think this should be better addressed somewhere else, please point me to the right direction, thanks!
The text was updated successfully, but these errors were encountered:
Hi @rvullriede,
thanks for raising this. I haven't seen this error before, but I have compiled AWT-based apps with GraalVM on GitHub actions without installing additional dependencies.
If I get the error right, it seems that additional dependencies like libGL, pango, etc are required, and it seems that's due to JavaFX. I'm not too familiar with JavaFX dependencies, but if that's true, we could add a feature to setup-graalvm that installs JavaFX native dependencies.
You mentioned that you only got this working with Liberica and that's probably only because they ship reachability metadata for AWT. It should also work with other distributions, like GraalVM CE or Oracle GraalVM, if you use the Tracing Agent to collect reachability metadata for your application. This can arguably be a bit annoying because you'd need to run it on all platforms as AWT is platform-specific. However, the metadata in Liberica is not specific to your app and may very well pull in a lot more code than actually is needed. So if you use the tracing agent, you may even get smaller binaries.
I have a small JavaFX app and researched quite a bit for a reliable way to compile this to native using GraalVM. It's worth noting that the app uses a tiny bit of good old AWT to configure the Taskbar icon.
I've tried a multitude of combinations of:
each in combination with:
The only working solution (including the tiny AWT piece) is:
I've set this up using Github Actions using the following config:
for the following os:
This works without any problems for macos-14, macos-13, windows-latest but it fails for ubuntu-latest with the following error:
You'll find the complete action here:
https://github.com/osslabz/log-gazer/blob/dev/.github/workflows/build-release-on-main-push.yml
and the complete run log here:
https://github.com/osslabz/log-gazer/actions/runs/12242211892/job/34149026394
I'm not quite sure if this is actually a problem with graalvm/setup-graalvm or maybe with the OS image itself or the Libernica NIC but since the setup is identical for all OS I'd naively assume it should work the same for all.
If you think this should be better addressed somewhere else, please point me to the right direction, thanks!
The text was updated successfully, but these errors were encountered: