Magmaruss
Posts: 4
Joined: Tue Nov 22, 2016 10:17 am

JDK + openJFX

Tue Nov 22, 2016 11:10 am

Welcome,

I have problem with javaFX applications on RPI. I'm following the instructions included here: http://chriswhocodes.com/
I downloaded latest JDK 8_111 and openJFX from this url and unpacked jdk and then openJFX with command:

Code: Select all

unzip openjfx-8-sdk-overlay-linux-armv6hf.zip -d /home/pi/jdk1.8.0_111
and when I want to execute simple app with command:

Code: Select all

jdk1.8.0_111/bin/java -jar BasicFX.jar
or another app I'm receiving error:

Code: Select all

Exception in Application start method
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
        at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Exception in Application start method
        at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
        at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$1(LauncherImpl.java:182)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ExceptionInInitializerError
        at javafx.scene.Node.reapplyCss(Node.java:8983)
        at javafx.scene.Node.impl_reapplyCSS(Node.java:8946)
        at javafx.scene.Node.invalidatedScenes(Node.java:854)
        at javafx.scene.Node.setScenes(Node.java:919)
        at javafx.scene.Parent.scenesChanged(Parent.java:659)
        at javafx.scene.Node.invalidatedScenes(Node.java:853)
        at javafx.scene.Node.setScenes(Node.java:919)
        at javafx.scene.Scene$9.invalidated(Scene.java:1119)
        at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:111)
        at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:146)
        at javafx.scene.Scene.setRoot(Scene.java:1072)
        at javafx.scene.Scene.<init>(Scene.java:347)
        at javafx.scene.Scene.<init>(Scene.java:223)
        at basicfx.BasicFX.start(BasicFX.java:31)
        at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$8(LauncherImpl.java:863)
        at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$7(PlatformImpl.java:326)
        at com.sun.javafx.application.PlatformImpl.lambda$null$5(PlatformImpl.java:295)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$6(PlatformImpl.java:294)
        at com.sun.glass.ui.monocle.RunnableProcessor.runLoop(RunnableProcessor.java:92)
        at com.sun.glass.ui.monocle.RunnableProcessor.run(RunnableProcessor.java:51)
        ... 1 more
Caused by: java.lang.NullPointerException
        at com.sun.javafx.font.PrismFontLoader.loadFont(PrismFontLoader.java:196)
        at javafx.scene.text.Font.<init>(Font.java:319)
        at javafx.scene.text.Font.getDefault(Font.java:86)
        at javafx.scene.CssStyleHelper.<clinit>(CssStyleHelper.java:1528)
        ... 22 more
Exception running application basicfx.BasicFX
Code of app is simple and copied from oracle examples BasicFX and working good on Windows. Can You tell me what I'm doing wrong? Please help me becouse I don't have much time to resolve that.

Regards,
Kamil

Return to “Java”