So I have an OpenJDK 8 installed on Raspbian Stretch; it crashes all the time. I then manually installed Oracle JDK 8u201 ; my app runs fine now no crashes. It misses JavaFX, though. I installed JavaFX following this guide: https://wimdeblauwe.wordpress.com/2017/08/26/using-javafx-on-raspberry-pi-3-with-gluon/
That seems "mostly" fine, because previous error about missing class
javafx/scene/Parent disappears. But now I'm missing
javafx/embed/swing/JFXPanel. I need that because my application is Swing based, and I only need JavaFX because of
WebView (Swing never received a working browser component).
I don't understand why they were shipping an incomplete API? Especially given that JFXPanel was working before with standard OpenJDK/OpenJFX installation (the one that was crashing for other reasons).
Is there a way I can "add" that missing class? I still have OpenJFX installed, perhaps I can locate the missing file there?
Update: To test, I copied
jfxrt.jar from OpenJFK into the jvm's directory (renaming it, so it doesn't override the one by Gluon). Then you have to give additional permissions for
/sys/class/input, following this document: https://alexconesa.wordpress.com/2017/08/14/udev-failed-to-write-to-sysclassinputmiceuevent-check-that-you-have-permission-to-access-input-devices-on-raspberry-pi/
Now the web view seems to be initialised, but then the system hangs. I could spot in the terminal
libEGL warning: DRI2: failed to authenticate
Indicating some QT problems (according to web searches). So I'm giving up here, seems you can't really use JavaFX reliably on the Pi. Kind of funny, given the amount of people that tell me all the time Swing is deprecated technology... it seems to be the most robust.