本文介绍了Raspberry pi上的JavaFx Ensemble的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的新RaspBerry pi上运行Esemble8.jar。我遵循了本教程:

I'm trying to run Esemble8.jar on my new RaspBerry pi. I followed this tutorial: http://www.oracle.com/webfolder/technetwork/tutorials/obe/java/RaspberryPiFX/raspberryfx.html

我能够安装Java8但是当我尝试运行Ensemble8时.jar(或任何其他小型JavaFx应用程序)我发生此错误:

I was able to install Java8 but when I try to run the Ensemble8.jar (or any other small JavaFx application) I've this error:

Error: Could not find or load main class ensemble.EnsembleApp

我的路径是正确的;你有什么建议来解决这个问题吗?

My PATH is correct; have you some suggestion to fix the problem?

谢谢!

推荐答案

自ARM版本的8u33以来,Oracle已经从ARM发行版中删除了JavaFX,因为它已经宣布。

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 (现在已离线)

  • OpenJFX Mailing

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

所以你将无法运行任何JavaFX应用程序......除非您将您的版本降级到支持JavaFX的最后一个JDK8u6,或者您提供有效的 jfxrt.jar

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.

你可以按照,跨越构建OpenJFX for ARM,或者只需使用一些已经构建的发行版,例如JavaFXPorts项目上托管的。

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.

下载 armv6hf-sdk.zip 后,解压缩它,您需要添加此命令行选项以将此外部源附加到classpath,扩展机制:

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

例如,您需要从实际路径运行其中一个JavaFX旧样本:

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

这篇关于Raspberry pi上的JavaFx Ensemble的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 03:05