JavaFx Ensemble on Raspberry pi

Since the 8u33 for ARM version, Oracle has removed JavaFX from the ARM distribution, as it was announced here.

You can read some statements about this in these forums:

  • Raspberry Pi Forum (now it’s offline)
  • OpenJFX Mailing list

So you won’t be able to run any JavaFX application… unless you downgrade your version to the last JDK8u6 that supported JavaFX, or you provide a valid jfxrt.jar.

And you can do it following this tutorial, cross building OpenJFX for ARM, or just using some already built distribution like this one hosted on the JavaFXPorts project.

Once you have downloaded armv6hf-sdk.zip, unzip it and you need to add this command line option to attach this external source to the classpath, with the extension mechanism:

-Djava.ext.dirs=<path to armv6hf-sdk>/rt/lib/ext

For instance, you need this to run one of the JavaFX old samples from its actual path:

sudo /opt/jdk1.8.0_33/bin/java -Djava.ext.dirs=<path to armv6hf-sdk>/rt/lib/ext -jar BrickBreaker.jar

Leave a Comment