Using JavaFX On Raspberry Pi 3 With Gluon - Wim Deblauwe's Blog
Using JavaFX On Raspberry Pi 3 With Gluon - Wim Deblauwe's Blog
In this post, I am going to detail the steps to get a simple JavaFX application running on the
Raspberry Pi 3 using Gluon.
Hardware
For this setup, I used the Raspberry Pi 3 with the o cial 7″ touchscreen connected.
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To nd out more, including how to control cookies, see here: Cookie Policy
https://wimdeblauwe.wordpress.com/2017/08/26/using-javafx-on-raspberry-pi-3-with-gluon/ 1/9
9/12/2018 Using JavaFX on Raspberry Pi 3 with Gluon | Wim Deblauwe's Blog
Insert the SD-card in the Raspberry Pi and let it boot. The screen should look like this when
done:
Find out the IP address of the Raspberry Pi by running ifconfig on the Pi itself or looking
at the DHCP clients list of your router.
Enable SSH to be able to easily copy les to the Raspberry Pi. See the o cial instructions
on how to do that.
Installation of Java
Download the ‘Linux ARM 32 Hard Float ABI’ Java SE Development kit from the Oracle
website. I downloaded jdk-8u144-linux-arm32-vfp-hflt.tar.gz.
(Replacing
Privacy & Cookies: 192.168.1.60
This site with
uses cookies. Bythe IP address
continuing of this
to use yourwebsite,
own device of course)
you agree to their use.
To nd out more, including how to control cookies, see here: Cookie Policy
Now unzip the copied le:
Close and accept
1 tar zxf jdk-8u144-linux-arm32-vfp-hflt.tar.gz
https://wimdeblauwe.wordpress.com/2017/08/26/using-javafx-on-raspberry-pi-3-with-gluon/ 2/9
9/12/2018 Using JavaFX on Raspberry Pi 3 with Gluon | Wim Deblauwe's Blog
Move the JDK to a location of your choice. I choose /opt and also created a symbolic link
for future updates:
Installation of JavaFX
Although Java 8 contains JavaFX by default, it does not contain what is needed to have
JavaFX applications running on the Raspberry Pi. For this, you need the Gluon JavaFX
Embedded SDK. Download it from http://gluonhq.com/products/mobile/javafxports/get/
On the Pi itself, unzip it and copy the unzipped les onto the just installed Java SDK. Take
note of what parts need to be copied where!
1 ./gradlew :HelloWorld:build
Now open a terminal on the Raspberry Pi itself and start the application:
1 This
Privacy & Cookies: sudo
site/opt/jdk8/bin/java -jartoHelloworld.jar
uses cookies. By continuing use this website, you agree to their use.
To nd out more, including how to control cookies, see here: Cookie Policy
NOTE: The sudo is needed to make the button click work. If you know of a way to avoid the
sudo part to make it work, leave a comment below!
Close and accept
https://wimdeblauwe.wordpress.com/2017/08/26/using-javafx-on-raspberry-pi-3-with-gluon/ 3/9
9/12/2018 Using JavaFX on Raspberry Pi 3 with Gluon | Wim Deblauwe's Blog
There is no exit implemented in the demo application, so you have to kill it over SSH to
stop it.
Conclusion
We saw how get a JavaFX application running on the Raspberry Pi 3 hardware using the
Gluon JavaFX Embedded SDK. I will explain how I combined JavaFX with Spring Boot for a
real fun programming stack in a future post.
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To nd out more, including how to control cookies, see here: Cookie Policy
https://wimdeblauwe.wordpress.com/2017/08/26/using-javafx-on-raspberry-pi-3-with-gluon/ 4/9
9/12/2018 Using JavaFX on Raspberry Pi 3 with Gluon | Wim Deblauwe's Blog
Advertisements
Report this ad
Report this ad
Share this:
Like
3 bloggers like this.
Related posts
https://wimdeblauwe.wordpress.com/2017/08/26/using-javafx-on-raspberry-pi-3-with-gluon/ 5/9
9/12/2018 Using JavaFX on Raspberry Pi 3 with Gluon | Wim Deblauwe's Blog
← Enable preview of Spring REST Docs snippets Using Spring Boot with JavaFX →
in IntelliJ IDEA
Pingback: JavaFX links of the week, August 28 | JavaFX News, Demos and Insight // FX
Experience
Maybe you must use sudo because your current user have not right on /opt/jdk8/bin/java?
Reply
Reply
You might want to ask a question on stackover ow.com to get somebody to help you
out.
Reply
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
Mauro Rulli
To nd out more, including how to controlAugust
cookies,9,see
2018 at 12:11
here: Cookie Policy
https://wimdeblauwe.wordpress.com/2017/08/26/using-javafx-on-raspberry-pi-3-with-gluon/ 6/9
9/12/2018 Using JavaFX on Raspberry Pi 3 with Gluon | Wim Deblauwe's Blog
Reply
Reply
Leave a Reply
Search …
Recent Posts
Datadog integration with AWS Elastic Beanstalk for Spring Boot application
Categories
Programming
Uncategorized
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
Tags
To nd out more, including how to control cookies, see here: Cookie Policy
Meta
Register
Log in
Entries RSS
Comments RSS
WordPress.com
Advertisements
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To nd out more, including how to control cookies, see here: Cookie Policy
Report this ad
https://wimdeblauwe.wordpress.com/2017/08/26/using-javafx-on-raspberry-pi-3-with-gluon/ 8/9
9/12/2018 Using JavaFX on Raspberry Pi 3 with Gluon | Wim Deblauwe's Blog
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To nd out more, including how to control cookies, see here: Cookie Policy
https://wimdeblauwe.wordpress.com/2017/08/26/using-javafx-on-raspberry-pi-3-with-gluon/ 9/9