Perhaps quite a lot of people are looking for a way to run JAVA FX on Raspberry Pi, but since there is little information in Japanese, I will omit it here.
The following articles are the most interesting when searching with Google teacher. https://qiita.com/sh1k1ya/items/72d40e6ef8b8cd51e68c "Try combining JavaFX and GPIO control on Raspberry Pi ... but not yet completed orz"
I used it as a reference, but it didn't work.
Development tool uses Eclipse
The method of introducing JAVAFX in Eclipse and developing it is left to other sites.
What you want to do
〇Introduce samba to Raspberry Pi and build a cross development environment with eclipse on windows
For windows10 you also need to enable the samba client programmatically and features
〇 Automatically execute the executable jar edited by Scene Builder
Execution procedure abbreviation
$/sudo apt-get install samaba
sudo nano /etc/samba/smb.conf
Added to the last line
[raspberry_pi] comment = Share path = /home/pi/samba public = yes read only = no browsable = yes force user = pi
6. Create a samba folder in / home / pi$ sudo mkdir /home/pi/samba
7. Service start * It will be started automatically when Raspberry Pi starts next time.$ sudo systemctl restart smbd
\$ export PATH="$PATH:/home/pi/samba/armv6hf-sdk"
・ Check the path
/$ echo PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games:/home/pi/samba/armv6hf-sdk
$ java --module-path /home/pi/samba/armv6hf-sdk/lib --add-modules=javafx.controls,javafx.fxml -jar /home/pi/samaba/test.jar
$ java --module-path /home/pi/samba/armv6hf-sdk/lib --add-modules=javafx.controls,javafx.fxml -jar /home/pi/samaba/test.jar
12. Auto start settingsExecute the following command to copy the template of the autostart file to the config of your home directory.
$ mkdir -p ~/.config/lxsession/LXDE-pi $ cp /etc/xdg/lxsession/LXDE-pi/autostart ~/.config/lxsession/LXDE-pi/
$ sudo nano ~/.config/lxsession/LXDE-pi/autostart
Added to the end of the configuration file
@java --module-path /home/pi/samba/armv6hf-sdk/lib --add-modules=javafx.controls,javafx.fxml -jar /home/pi/samaba/test.jar
14. Reboot and confirm automatic startupWith this method, the media player gets an exception and doesn't work. Is ffmpeg not installed? I'm not sure If it goes well, I will write it again
cd /home/pi wget https://download.bell-sw.com/java/13/bellsoft-jdk13-linux-arm32-vfp-hflt.deb sudo apt-get install ./bellsoft-jdk13-linux-arm32-vfp-hflt.deb sudo update-alternatives --config javac sudo update-alternatives --config java
Recommended Posts