Jetson/JavaFX
Contents
JavaFX for Jetson TK1
This guide provides a custom Java SE Development Kit (JDK) 8 for ARM which is capable of running JavaFX applications on the Jetson TK1 with OpenGL acceleration.
The JDK is tested against the JavaFX demos provided by Oracle (Ensemble, MandelbrotSet & 3DViewer) running on a Jetson TK1 in graphical mode (lightdm) on the latest provided image R21.2 of Linux 4 Tegra (kernel 3.10.40).
Howto Easy - Download precompiled
Download & install
- Download and install the JDK 8 Update 33 for ARM provided by Oracle.
- Dowload File:Jdk1.8.0 40-SNAPSHOT-lib.zip and extract the content into the <jdk8-arm-install-dir>/jre/lib/ directory.
Add missing symbolic links for OpenGL, EGL & udev
cd /usr/lib/arm-linux-gnueabihf ln -s tegra-egl/libGLESv2.so.2 libGLESv2.so ln -s tegra-egl/libEGL.so.1 libEGL.so ln -s libudev.so libudev.so.0
Howto DIY - Cross compile OpenJFX libs yourself
Instead of step 2 mentioned above build the required files yourself following the "Building OpenJFX" guide from the OpenJFX website.
Supported pipelines
JavaFX supports different rendering pipelines. This build was only tested using the 'monocle' pipeline with working OpenGL hardware acceleration.
In case your JavaFX application doesn't start or work as expected try the following options for more debug info:
- -Dprism.verbose=true
- -Dprism.debug=true
- -Djavafx.verbose=true
- -Djavafx.debug=true
To force JavaFX into a rendering pipeline try:
- -Djavafx.platform=monocle/eglfb/sw etc (see <jdk-installdir>/jre/lib/javafx.platform.properties for more options)
Example
java -Djavafx.platform=monocle -Dprism.verbose=true -Dprism.debug=true -Djavafx.verbose=true -Djavafx.debug=true -jar Ensemble8.jar
Why is a custom build JDK needed?
Although the currently provided JDK 8 Update 6 for ARM by Oracle is perfectly capable to run JavaFX on other ARM boards out of the box with hardware acceleration, it doesn't allow you to run JavaFX applications with OpenGL support on the Jetson TK1 yet.
This custom build is derived from the current 8u-dev repository of the openJFX project which holds the upcoming 8u40 release. Hopefully once 8u40 is released this custom compiled version is not needed anymore.