Issue
I have been trying for days now to figure out how to run a JavaFX 11 desktop application I made (using Gradle) on my Raspberry Pi but to no avail.
I have looked at many guides, but most of them use Java 8, or maven, or something else. At this point, I have no idea where to start.
What I have Tried Before
- Install
bellsoft openjdk11
- Download
openjfx-11
sdk and unzip - clone my gradle javafx 11 project from github
- edit build.gradle to say
sdk=/opt/armv6hf-sdk
- chmod +x ./gradlew
- ./gradlew run
There error I am getting is could not find :javafx.base:. Searched in the following locations: -file:/opt/armv6hf/lib/javafx.base.jar
What am I doing wrong?
Do I clone the GitHub repo to my Pi? Do I build it on my Windows machine and then move it over?
Update
It now builds, but I am getting an error about Unable to open DISPLAY
I am 90% sure that this is because I am running raspbian lite (no desktop). How can I run my application without running a full desktop enviornment? Is that even possible?
Solution
I believe that you have installed the version of Liberica without JavaFX.
Not too long ago Bell-SW added a "full version" which is found at the bottom of the page.
Please note that you need the normal and not embedded JDK but I don't see that as an issue.
- JDK 13 Armhf (32-bit) tar.gz: https://download.bell-sw.com/java/13.0.2+9/bellsoft-jdk13.0.2+9-linux-arm32-vfp-hflt-full.tar.gz
JDK 13 Armhf (32-bit) deb: https://download.bell-sw.com/java/13.0.2+9/bellsoft-jdk13.0.2+9-linux-arm32-vfp-hflt-full.deb
JDK 11 Armhf (32-bit) tar.gz: https://download.bell-sw.com/java/11.0.6+10/bellsoft-jdk11.0.6+10-linux-arm32-vfp-hflt-full.tar.gz
- JDK 11 Armhf (32-bit) deb: https://download.bell-sw.com/java/11.0.6+10/bellsoft-jdk11.0.6+10-linux-arm32-vfp-hflt-full.deb
Source of links: https://bell-sw.com/pages/java-13.0.2/ and https://bell-sw.com/pages/java-11.0.6/
I'd recommend JDK 13 unless you have a reason not to use it.
Answered By - Nand