JavaFx Ensemble on Raspberry pi

廉价感情. 提交于 2019-11-27 07:55:26

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
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!