JavaFX on ARM runs jdk1.8.0

I know that Oracle removed JavaFX in 8u33, but I wonder why I can not use JavaFX with jdk1.8.0? I got it from Oracle archives ( http://download.oracle.com/otn/java/jdk/8-b132/jdk-8-linux-arm-vfp-hflt.tar.gz )

I have it extracted in /usr/bin/java_8_arm/jdk1.8.0 and I run my .jar file with sudo /usr/bin/java_8_arm/jdk1.8.0/bin/java -jar jarfile.jar

Running /usr/bin/java_8_arm/jdk1.8.0/bin/java -version returns

 java version "1.8.0" Java (TM) SE Runtime Environment (build 1.8.0-b132) Java HotSpot (TM) client VM (build 25.0-b70, mixed mode) 

and System.out.println("Running Java version: " + Runtime.class.getPackage().getImplementationVersion());

returns Running Java Version: 1.8.0

The error I am getting is:

 Exception in thread "main" java.lang.NoClassDefFoundError: javafx/embed/swing/JFXPanel at front_end.GUI.initGUI(GUI.java:47) at back_end.Run.main(Run.java:28) Caused by: java.lang.ClassNotFoundException: javafx.embed.swing.JFXPanel at java.net.URLClassLoader$1.run(URLClassLoader.java:372) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:360) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 2 more 

If you're interested, I program and compile the program into a shared file through Windows 7 and launching the JAR from the Raspberry Pi.

inb4 "why do you need javafx on raspberry pi" - for rendering html, since other java components only support html 3.2. I tried other renderers. This is the only one on which I could work directly on my desktop, not to mention RPi.

In addition, I program and compile on 1.8.0.

UPDATE:

As Jose Pereda said, I downloaded JavaFX files and put them in my original java installation (now I use /usr/bin/jdk8u6/ as my folder and obviously jdk1.8.0_06 ).

Here is my installation hierarchy, starting with the lib directory:

 /usr/bin/jdk8u6/lib/: arm ext javafx.properties jfxswt.jar tools.jar ct.sym ir.idl jconsole.jar orb.idl dt.jar javafx.platform.properties jexec sa-jdi.jar /usr/bin/jdk8u6/lib/arm: jli libgstreamer-lite.so libjfxmedia.so libdecora_sse.so libjavafx_font_freetype.so libjfxwebkit.so libfxplugins.so libjavafx_font_pango.so libprism_common.so libglass_monocle.so libjavafx_font.so libprism_es2_eglfb.so libglass_monocle_x11.so libjavafx_iio.so libprism_es2_monocle.so libglass.so libjawt.so libprism_sw.so /usr/bin/jdk8u6/lib/arm/jli: libjli.so /usr/bin/jdk8u6/lib/ext: jfxrt.jar 

I still get the same error.

+6
source share
1 answer

You can download the updated and updated version of JavaFX for ARM from here: JavaFX Embedded SDK

After loading on your raspberry Pi, you will need to extract and copy the contents to your JDK 1.8 (check this link for the built-in).

You can run the latest JavaFX for ARM * on your Pi, including the WebView control.

In addition, using the Gluon plugin for your IDE, you can remotely deploy the project to your Pi.

EDIT

* ARM: Note that JavaFX for ARM never supported Swing. Other features, such as WebView and Media, were also not supported, but they have recently been included in the Gluon assembly.

+3
source

All Articles