Good morning raspberries
I've read so much posts and tutorials, but I did not manage to install JavaFX on my RPI 3. In most times the tutorials werde to old.
Can anyone tell me how to set up JavaFX for the newest Pi? Please step for step, as I'm not quite familiar with the Pi.
Greets
H4rd_B4se
Re: How to run JavaFX on Raspberry Pi 3
I would also like to know this. I have tried all day to add javafx to raspberry pi 3 and i am still getting the error:
"JavaFX deployment library not found in the active JDK" in netbeans when i try to build, even though there are no errors showing in my code.
I downloaded the gluon community build for javaFX embedded sdk here: http://gluonhq.com/labs/javafxports/downloads/
and followed the instructions here: http://docs.gluonhq.com/javafxports/
please can anyone offer any easy to follow advice on getting javaFX working on raspberry pi 3!
"JavaFX deployment library not found in the active JDK" in netbeans when i try to build, even though there are no errors showing in my code.
I downloaded the gluon community build for javaFX embedded sdk here: http://gluonhq.com/labs/javafxports/downloads/
and followed the instructions here: http://docs.gluonhq.com/javafxports/
please can anyone offer any easy to follow advice on getting javaFX working on raspberry pi 3!
Re: How to run JavaFX on Raspberry Pi 3
I have not tried this with the downloads from http://gluonhq.com/labs/javafxports/downloads/; instead, here is roughly what worked for me (RPi3):
1. installed Oracle JDK with (if you don't have it yet) - note: you could also install Open JDK instead of the Oracle JDK; I did not go down that route
2. possibly make sure that that is the selected JDK with
3. You may also have to run to change the Memory Split to 256 MBytes (I think it is 64MBytes by default) - see "Advanced Options" in raspi_config
4. The Oracle JDK on Raspberry no longer includes JavaFX, so you'll need to also install OpenJFX, and basically "overlay" the Oracle JDK with OpenJFX; here is how I did it:
5. Go to http://chriswhocodes.com/
6. Download OpenJFX 8u60 stable for armv6hf (http://chriswhocodes.com/downloads/open ... rmv6hf.zip)
7.
8. I don't think I changed anything to compile; If you do get compile time errors; try i.e. tell javac explicitly where to pick up the installed extensions from
8.
9. Unfortunately, I don't remember how I got to use at runtime - this may be specific to my setup (I am using a PiTFT Display, i.e. not using HDMI/external monitor)
10. I also don't know what needs to get done in Netbeans to make this work - in my workflow, I use a Mac for development in an IDE with a maven-based build, and then I simply use git to pull updates onto my RPi and to compile and run - in other words, I do not at the moment do any remote debugging or anything like that. It's a bit of a pain, but trying to run any IDE on the RPi seemed even more painful.
1. installed Oracle JDK with
Code: Select all
sudo apt-get install oracle-java8-jdk
2. possibly make sure that that is the selected JDK with
Code: Select all
$ sudo update-alternatives --config javac
$ sudo update-alternatives --config java
Code: Select all
raspi_config
4. The Oracle JDK on Raspberry no longer includes JavaFX, so you'll need to also install OpenJFX, and basically "overlay" the Oracle JDK with OpenJFX; here is how I did it:
5. Go to http://chriswhocodes.com/
6. Download OpenJFX 8u60 stable for armv6hf (http://chriswhocodes.com/downloads/open ... rmv6hf.zip)
7.
Code: Select all
unzip openjfx-8-sdk-overlay-linux-armv6hf.zip -d /home/pi/jdk1.8.0_92
Code: Select all
javac -Djava.ext.dirs=/home/pi/jdk1.8.0_92/jre/lib/ext/ ...
8.
Code: Select all
java -Djava.ext.dirs=/home/pi/jdk1.8.0_92/jre/lib/ext/ -Djavafx.platform=monocle -Dmonocle.screen.fb=/dev/fb1 -Dexec.mainClass="your.main.App"
Code: Select all
-Dmonocle.screen.fb=/dev/fb1
10. I also don't know what needs to get done in Netbeans to make this work - in my workflow, I use a Mac for development in an IDE with a maven-based build, and then I simply use git to pull updates onto my RPi and to compile and run - in other words, I do not at the moment do any remote debugging or anything like that. It's a bit of a pain, but trying to run any IDE on the RPi seemed even more painful.
Re: How to run JavaFX on Raspberry Pi 3
Thankyou, this was helpful. i did manage to get it to run on my Pi after a while, but it seems the JavaFX media libraries are not supported, which is what i needed (i need to play a .mp4 video clip). Any suggestions for a work around?
I'm trying to make an app that will start to play a random video from a directory on a key press and stop the video on the key release. I have this working fine on my PC using the JavaFX media library but cannot get it to work on the Pi
I'm trying to make an app that will start to play a random video from a directory on a key press and stop the video on the key release. I have this working fine on my PC using the JavaFX media library but cannot get it to work on the Pi
Re: How to run JavaFX on Raspberry Pi 3
Is there an update to this? I got stuck after unzipping the folder because the commands don't seem to work but i'm sure i'm not doing it right. i'm not that good with linux. I know I have to do something else after unzipping it but nothings working.
-
- Posts: 27225
- Joined: Tue Mar 25, 2014 12:40 pm
Re: How to run JavaFX on Raspberry Pi 3
In 2016 the Operating System was likely Wheezy and since then we have had Jessie and Stretch, so appending (Necroing) to an out of date post seems pointless !
Maybe openjfx ?
https://packages.debian.org/stretch/openjfx
Take what I advise as advice not the utopian holy grail, and it is gratis !!
Re: How to run JavaFX on Raspberry Pi 3
The last time I used JFX I installed Netbeans on Windows and the Oracle tools for Pi's.
Wrote the code on Windows and ported it via Netbeans over the Ethernet via TCP/IP?
Not a lot of fun getting it going well.
But then Oracle dropped all the support and it went Open, have not tried it since.
I needed minimum of a Pi2 to run my FX app and it only ran well when the Pi3's came out, never tried it on a Pi3B+.
Wrote the code on Windows and ported it via Netbeans over the Ethernet via TCP/IP?
Not a lot of fun getting it going well.
But then Oracle dropped all the support and it went Open, have not tried it since.
I needed minimum of a Pi2 to run my FX app and it only ran well when the Pi3's came out, never tried it on a Pi3B+.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges
Raspberries are not Apples or Oranges