1

I downloaded and installed JDK8u33 for ARM on my beaglebone black, and according to this documentation (http://docs.oracle.com/javase/8/embedded/jdk-arm-8u6/index.html) javafx is included and supported.

However, I can not find jfxrt.jar anywhere in the JRE or JDK, and using javac on a simple javafx program yields "javafx.application" is not a package.

What gives?

Sam Coulter
  • 708
  • 1
  • 6
  • 27
  • Related question on [using JavaFX on a Raspberry Pi](http://stackoverflow.com/questions/28284239/javafx-ensemble-on-raspberry-pi) – jewelsea Feb 06 '15 at 18:46
  • @jewelsea Yes, I was going to post it as a comment, do I delete my answer? – José Pereda Feb 06 '15 at 18:48
  • Nah, keep it. I was thinking of closing the question as a duplicate, but this question is a bit more general, so I think it is fine to have the Q&A left here even though they are a bit similar. – jewelsea Feb 06 '15 at 18:50

2 Answers2

5

As @eckig says, since the 8u33 for ARM version, Oracle has removed JavaFX from the ARM distribution.

To run any JavaFX application you can downgrade your version to the last JDK8u6 that supported JavaFX, or you can 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
José Pereda
  • 44,311
  • 7
  • 104
  • 132
  • Just so I understand, I need to add that option every time I try and launch a javafx program? Is there anyway to... add it permanently? – Sam Coulter Feb 06 '15 at 18:51
  • 2
    Well, you can create a script file to lauch it – José Pereda Feb 06 '15 at 18:52
  • You may consider installing (copying or symlinking) the contents of `rt/lib/ext` and `rt/lib/ext` directly into your JVM eg: `$JAVA_HOME/jre/lib/ext` and `$JAVA_HOME/jre/lib/arm respectively`. This will remove the need to run apps with the `-Djava.ext.dirs=/rt/lib/ext` directive. – Philip Couling Feb 20 '15 at 17:57
2

The latest version of the Java Development Kit for ARM processors (JDK 8u33 for ARM) no longer supports JavaFX Embedded, it has been all of the tech news, for example here: http://jaxenter.com/jdk-arm-without-javafx-end-javafx-embedded-114212.html

eckig
  • 10,964
  • 4
  • 38
  • 52
  • 1
    Bummer... Strange they havent updated their official docs. Is there any way to download an older version of the JDK8 for Arm with Javafx? – Sam Coulter Feb 06 '15 at 18:46