0

I have a project compiled on Oracle JDK-8 based on JavaFX features. I need to run it on Windows 10 (no problem, I have an Oracle JRE 8 for Windows/64) and on Raspberry pi4. Raspbian's repositories offer just OpenJDK-11, JavaFX isn't boundled in it so to get it to work (partially) need a bit of effort to compile my programs including modules. It's not platform indipendent. Does exist a JRE-8 with JavaFX bundled that can run JDK-8 compiled software on Raspberry pi4?

mauretto
  • 3,183
  • 3
  • 27
  • 28
  • 1
    Check this [answer](https://stackoverflow.com/a/40483500/3956070). – José Pereda Aug 02 '19 at 15:01
  • I can't get it work: "java.lang.RuntimeException: java.lang.UnsatisfiedLinkError: Can't load library: /opt/jdk1.8.0_221/jre/lib/arm/libglass_monocle.so". Maybe the links in that answer lost compatibility each other. – mauretto Aug 05 '19 at 11:46
  • Check that the missing library is part of the armv6hf-sdk-8.60.8 zip, then check that you have copied it properly to `path/to/JDK/jre/lib/arm/` (verify that you have there all the *.so libraries). – José Pereda Aug 05 '19 at 12:11
  • Obviously there isn't that lib. Seems that lib isn't part of the arm jdk anymore. – mauretto Aug 06 '19 at 06:12
  • Update: using bellSoft Lirica (bundled jdk11+javaFx for arm too), launching my program with -Djavafx.platform=eglfb option and after enable KMS, most works fine. But I got a "Could not initialize class com.sun.webkit.WebPage" error inside a page where I have to display some web content (using WebPage tool of course). – mauretto Aug 06 '19 at 07:29
  • Ok, I see now, there is an issue with the 8.60.12 distribution for embedded (it will be fixed soon). As far as I know there are still no distributions for ARM on Java 11 that build webkit. If you really need the webkit, you need to stick to Java 1.8 and add the JavaFX embedded SDK. While 8.60.12 is fixed you can try [8.60.11](https://nexus.gluonhq.com/nexus/content/repositories/releases/org/javafxports/armv6hf-sdk/8.60.11/armv6hf-sdk-8.60.11.zip). – José Pereda Aug 06 '19 at 09:19
  • Ok, [8.60.12](https://gluonhq.com/products/mobile/javafxports/get/) is fixed now, it would be good if you could test it. – José Pereda Aug 06 '19 at 20:14
  • @JoséPereda I figured that I already used the 8.60.12 for embeddet. But I downloaded it again and... IT WORKS!!! Why not a 8.60.*13* build??? Thanks so much, how do you know it (off topic of course)? Now I can replace Win10 mini-PC with RaspberryPi4 micro-controller. I'm excited about this. Thanks again. P.S.: Write your last comment as answer, I'll accept it. – mauretto Aug 07 '19 at 13:55
  • Done. It was a failure in the "packaging" process of the native libraries, not in the build itself, so there was no need of a new version (also to keep it in pair with the Android and iOS SDK distribution). Btw, this is OSS, and you can see the commits [here](https://bitbucket.org/javafxports/8u-dev-rt/). – José Pereda Aug 07 '19 at 14:18
  • NB. I came here looking for help installing Oracle Java 8 onto my Pi but this is a slightly different question. So I asked my own one. https://raspberrypi.stackexchange.com/questions/123977/how-do-i-install-unifi-network-controller-and-oracle-java-8-on-raspbian-10-bust Hope it helps people who have the same question as me. – Dawngerpony Apr 11 '21 at 14:39

1 Answers1

1

Oracle's Java 1.8 for ARM doesn't include JavaFX for ARM, so you can download the latest version available (8.60.12) from here. Other versions can be found as well from this repository. This answer covers how to install it.

You could also switch to Java 11, use JavaFX for ARM SDK from here, or even find a distribution that bundles it with the JDK.

But if you need WebView, as far as I know, 8.60.12 is the only distribution of JavaFX for ARM that includes media and WebView.

José Pereda
  • 44,311
  • 7
  • 104
  • 132