JavaFX 可以在树莓派上使用吗 [英] Can JavaFX be used on Raspberry Pi

查看:27
本文介绍了JavaFX 可以在树莓派上使用吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 JavaFX 为 Raspberry Pi 编写程序,但我的 Raspberry Pi 上的 Java SDK 8 似乎不支持 JavaFX.

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.

所以我的问题是 Raspberry Pi 2/3 是否支持 JavaFX?如果是,为什么 JDK 平台上没有 JavaFX 库?有没有办法支持它或值得在 Raspberry PI 上编写 JavaFX 应用程序?

So my question is whether JavaFX is supported on Raspberry Pi 2/3? If yes, why does JDK not have JavaFX libraries on the platform ? Is there a way to support it or worth writing JavaFX application on Raspberry PI ?

使用的 Java 版本是 1.8.0_65.

Java version in use is 1.8.0_65.

推荐答案

如果您使用 Oracle JDK for ARM 8u33/Oracle Java SE Embedded 8u33 或更高版本,您将找不到捆绑在JDK.从 8u33 开始,Oracle 从 ARM 捆绑包中删除了 JavaFX Embedded.有关更多信息,请查看 OpenJFX 邮件中的 该线程列表.

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.

那么,我们还能在 Raspberry PI 上使用 JavaFX 吗?

So, can we still use JavaFX on Raspberry PI?

好吧,当然可以.以下是一些仍然可以在嵌入式设备上运行 JavaFX 的方法:

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

  1. 最好的办法是安装嵌入式 SDK,由 Gluon 提供,其中包括 jfxrt.jar 用于 ARM.您可以将 jar 复制到 JDK 中,并在 Raspberry PI 上运行 JavaFX.Gluon 通过帮助用户通过插件部署 JavaFX 插件来进一步扩展支持.看看:

  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 :

如果您想了解有关嵌入式 JavaFX 的更多信息,这些是一些有用的链接:

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

这篇关于JavaFX 可以在树莓派上使用吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆