JavaFx ensemble on raspberries pi

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

I managed to install Java8, but when I try to run Ensemble8.jar (or any other small JavaFx application), I have this error:

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

My WAY is right; Do you have any suggestion to fix the problem?

Thanks!

+5
source share
1 answer

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

You can read some statements about this in these forums:

  • Raspberry Pi Forum (it is now disabled)
  • OpenJFX Mailing List

This way you won’t be able to run any JavaFX application ... unless you downgrade your version to the latest JDK8u6 that supports JavaFX, or you provide a valid jfxrt.jar .

And you can do this after this tutorial , cross-building OpenJFX for ARM, or just using some distribution kit already built, like this one , hosted in the JavaFXPorts project.

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

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

For example, you need this to run one of the old JavaFX 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 
+15
source

Source: https://habr.com/ru/post/1212462/


All Articles