Run JavaFX on Raspberry Pi

preview_player
Показать описание
The video demo how to develop a simple JavaFX application on Windows 8 Netbeans, run on Raspberry Pi.
Рекомендации по теме
Комментарии
Автор

can u share a step by step process to do it. I am an embedded programmer and PCB maker. I seem to do it almost rigth but in the end when i run my jar at PI it says
Could not find or load main class

jugnu
Автор

Same error main class not found. Could u share image file?

justkingv
Автор

Error:could not found or load main class

kaischaabane
Автор

cant get javafx to work on raspberry pi3

Raspberry PI3 + with HDMI screen setup :-
format sd card, write Raspbain Jessie Lite image to class 10 32 GB Micro SD card
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install raspberrypi-bootloader –reinstall
Install pango library for Fonts
Sudo apt-get install libpango-1.0-0:armhf libpangoft2-1.0-0:armhf
Sudo apt-get install libpango1.0-0:armhf
sudo raspi-config -> Memory split = 256 - Enabled SSH
download Linux ARM 32 Hard Float ABI
Copy to /home/pi via filezilla
sudo tar zxvf FileName.gz -C /opt
JavaFX Embedded SDK 8.60.8 armv6 hard float
Copy files as under
-> jre/lib/ext/
armv6hfsdk/rt/lib/arm/* -> jre/lib/arm/
-> jre/lib/
-> jre/lib/
armv6hfsdk/rt/lib/jfxswt.jar -> jre/lib/
sudo update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_121/bin/javac 1
sudo update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_121/bin/java 1
sudo update-alternatives --config javac
sudo update-alternatives --config java
sudo nano .bashrc
export JAVA_HOME=/opt/jdk1.8.0_121
export PATH=$JAVA_HOME/bin:$PATH
setterm ‐blank 0 <- prevent screen going blank
Now java -version gives :-
java version 1.8.0_121
java SE Environment
Java Hotspot
sudo nano /etc/kbd/config
BLANK_TIME = 0 POWERDOWN_TIME = 0
sudo nano /boot/config.txt
framebuffer_width=1280
framebuffer_height=720
Also tried my small HDMI screen resolution = 800 x 480

My Windows PC Setup :-
Widows 7 PC with JDK1.8.0_121
Netbeans 8.0.2 - Remote Java SE Platform - Remote JRE Path =/opt/jdk1.8.0_121
Exec sufix = sudo Test Platform = Success
Created a JavaFX FXML application using scene builder 1.1 named hi.jar
Application runs fine on windows machine
VP Option => JAVAFX_DEBUG=1 -Djavafx.platform=eglfb -Dglass.platform=Monocle -cp
-Dmonocle.screen.fb=/dev/fb0 /dev/fb0 = HDMI frame Buffer
-Dprism.verbose=true -Dprism.debug=true -Djavafx.verbose=true -Djavafx.debug=true
but on my system ls -lar /dev/fb* => /dev/fb0 = HDMI Frame Buffer
I tried different VM option conbinations and get following prominant errors :-
(1)Unable to load font (even though i have pango library installed and /usr/share/fonts has many .ttf files)
(2) not able to find or load class ( i am sure it find Main method but fails to load it)
(3) No setting found for javafx.platform=eglfb ( i expect jvafx to use /dev/fb0 HDMI frame buffer, also looked into javafx.platform.properties file but could not draw any conclusion)
Please drop me few words of advice
Thank You

jugnu
welcome to shbcf.ru