Can JavaFX be used on Raspberry Pi

后端 未结 7 1376
甜味超标
甜味超标 2020-12-25 15:08

I want to write program for Raspberry Pi using JavaFX but it appears that Java SDK 8 on my Raspberry Pi does not have JavaFX support.

So my question is whether Java

7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-25 15:38

    If you are using Oracle JDK for ARM 8u33 / Oracle Java SE Embedded 8u33 or later, you will not find JavaFX bundled in the JDK. Oracle removed JavaFX Embedded from the ARM bundle starting from 8u33. For more information have a look at this thread from the OpenJFX mailing list.

    So, can we still use JavaFX on Raspberry PI?

    Well, of course you can. Here are a few ways you can still run JavaFX on embedded devices :

    1. Your best shot is to install embedded SDK, provied by Gluon, which includes jfxrt.jar for ARM. You can copy the jar into the JDK and have JavaFX running on Raspberry PI. Gluon further extends the support by helping users deploy there JavaFX plugin via plugin. Have a look at :

      • Getting Started for Embedded
      • Building and Deploying for Embedded
    2. You can use a previous version of Oracle JDK which bundles JavaFX with it.
    3. You can also build the OpenJFX and add it to your JDK (not an easy way).

    If you want to know more about JavaFX on embedded, these are some useful links :

    • Cross Building for ARM Hard Float
    • Where's JavaFX in recent Java 8u33 for the ARM ?
    • For JavaFX 11, one can read JavaFX 11 early access on embedded.

提交回复
热议问题