1

I have been trying to install/run JavaFX18 from Gluon on my raspberry pi4 and getting the following error message:

Exception in thread "main" java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

(... edited...)

Caused by: java.lang.UnsatisfiedLinkError: /opt/javafx-sdk-18/lib/libglass.so: /opt/javafx-sdk-18/lib/libglass.so: undefined symbol: g_direct_hash

here is my config:

  • Java: Linux/arm32 jdk-17.0.1+12
  • JavaFx: Linux/arm32 openjfx-18-ea+7 (also tried 17.0.1 and 17.0.2)

I'm following the instruction per Gluon doc (https://docs.gluonhq.com/#platforms_embedded) using the simple HelloFX example (https://github.com/openjfx/samples). Here are the commands I'm executing in the HelloFX directory (where src is) on my pi:

  1. sudo /opt/jdk-17.0.1+12/bin/javac -verbose --module-path=/opt/javafx-sdk-18/lib --add-modules=javafx.controls src/hellofx/HelloFX.java -d dist
  2. sudo /opt/jdk-17.0.1+12/bin/java -Dglass.platform=gtk -Djava.library.path=/usr/java/packages/lib:/lib:/usr/lib:/opt/javafx-sdk-18/lib --module-path=/opt/javafx-sdk-18/lib --add-modules=javafx.controls -cp dist/. hellofx.HelloFX

[Note this is running with X11, not in Kiosk/CLI mode; the Gluon doc also shows how to run that same example in non-desktop mode with DRM..etc: I have tried this and working reasonably ok; I haven't tried the 64b variant yet]

has anyone stumbled on this issue and able to work around?

MaxL
  • 11
  • 2
  • Use non-early access versions, e.g. JavaFX version 17.0.1, not 18-ea+7 – jewelsea Nov 28 '21 at 03:18
  • Same issue with JavaFX 17.0.1 and 17.0.2: Caused by: java.lang.RuntimeException: java.lang.UnsatisfiedLinkError: /opt/javafx-sdk-17.0.1/lib/libglass.so: /opt/javafx-sdk-17.0.1/lib/libglass.so: undefined symbol: g_direct_hash – MaxL Nov 28 '21 at 20:14

1 Answers1

0

FWIW: Certainly not a good solution with unknown side effect: I used the libglass.so from JavaFX11 SDK replacing that same file in JavaFX17.0.1/lib and the HelloFX example works launching from the desktop.

so... either there is a bug in the FX 17.0.1/17.0.2 and 18 Linux/arm32 SDKs with that libglass.so file or some obscure settings are required.

MaxL
  • 11
  • 2
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Nov 29 '21 at 22:40