Temurin-build: JavaFX is missing in OpenJDK 8 Distributions

Created on 27 Sep 2018  ·  116Comments  ·  Source: adoptium/temurin-build

Hallo,

currently JavaFX libraries are missing from the OpenJDK 8 Windows Distributions. Is there a plan to include JavaFX in the AdoptOpenJDK Distributions?

Many thanks in advance for your help!

enhancement wontfix

Most helpful comment

I think that developers who needs bundled JavaFX (OpenJFX) can use below distributions.

ZuluFX and Liberica are supported JDK 8/11, Corretto is now JDK 8 only and in preview.

All 116 comments

@SzentnerTsIT Yes, we have a few open issues on this already. It'll be a few weeks at best I'm afraid. We'll be starting with Java 11 and going backwards

Is have this issue with AdoptOpenJdk 1.8u192b12 on Linux (not Windows),
shouldn't it be working or do I miss something ?
TIA for your answer

See #245 as well - this is also possibly an installer issue - repoening.

I do not use installer, I untar the downloaded archive and use "update-alternatives --install" to install the jdk (notice that is is not exactly the original issue, this is a linux issue).
I saw that the jfxrt.jar is missing in the AdoptOpenJDK distrib when comparing the jre/lib/ext directory content of AdoptOpenJDK 8u192 (1st window) and oracle jdk 1.8u192 (2nd window) (see the attached screenshot) may be this is the problem?
Thanks for your answer anyway
image

What Windows releases include JavaFX?

@alexhass , the windows oracle jdk 1.8 does, I have no windows system right now to make a screenshot, but looking at the doc web site, you see the api is included in 1.8. https://docs.oracle.com/javase/8/javafx/api/toc.htm
JavaFX have moved to openJFX starting after 1.8 ( ie 9, 10 & 11)

2 weeks ago I tested PDFsam on windows with 8.x and it complained that it cannot detect java. I just assumes it is not embedded. Maybe a bug in pdfsam.

I download jdk8u192-b12-jre and checked path \lib\ext\ again and there is NO jfxrt.jar

You have to look at jre directory under jdk not jre outside jdk directory tree.
Here on a windows machine with jdk 191 (screenshot taken yesterday, I did not install 192 since it is not my machine):
jdk-jfxrt
I noticed the problem because I have some code that compiles (under linux) with oracle jdk and who does not compile with Adoptopenjdk (under linux) because it cannot find javafx packages, the corda open source project. I did not try Adoptopenjdk under Windows.
This project is actually using jdk 1.8, and I cannot switch to jdk11 easily, it is 5.4M lines of code and there are some specific tweaks, There is a sigificant amout of work.
And I did not said it but I am very grateful to all people maintening the Adoptopenjdk distribution and thank them for their work, this is a very important initiative

You refer to Oracle Java. But I talk about AdoptOpenJDK‘s JRE.

The AdoptOpenJDK packages are missing JavaFX. That is causing a lot of troubles. For example PDFsam cannot used on Windows.

Yes, I checked Oracle jdk .
It looks like the javafx libraries are missing both in linux and windows AdoptOpenJDK builds.

Is there an E.T.A on when JavaFX may be included in the 8.x releases?

Hope this solved before Oracle Java 8 reach EOL in two? more releases (u211).

Any ETA with Oracle Java 8 EOL comming up?

Thanks
Michael

I think that developers who needs bundled JavaFX (OpenJFX) can use below distributions.

ZuluFX and Liberica are supported JDK 8/11, Corretto is now JDK 8 only and in preview.

We are looking to advise our customers to use adoptopenjdk with our product. Most of our products do not use javafx.

Because of the cost of validation, we will support one java distribution. We would like to use adoptopenjdk.

Is there any ETA on openJFX in the windows distribution. We are ok going with the linux java 1.8 distributions of openjdk for now. The first one off the cliff is windows java 1.8.

We're hoping to have something in place by the end of Q1 at the latest

@karianna if so, that would be final EOL release of Java 8 right? I need 32-bit version.
IBM will also "have" it (J9 not OpenJ9) long after incoming EOL if you search "Ship Java 8 APAR FOR WAS"

@karianna if so, that would be final EOL release of Java 8 right? I need 32-bit version.
IBM will also "have" it (J9 not OpenJ9) long after incoming EOL if you search "Ship Java 8 APAR FOR WAS"

We'll add it to AdoptOpenJDK as an option in the installers most likely. For win-32 that may be tricky. @johanvos and @ali-ince will have to comment on the feasibility of that.

There is more to it than just jfxrt.jar. If you search the Oracle JDK distribution for files with fx in them you'll find about a dozen files that seem relevant. Amazon Corretto does have jfxrt.jar but is missing jfxwebkit.dll and some others, plus it's jfxrt.jar file is a lot smaller. The Amazon distribution is not complete either, it may work to compile but crashes at runtime if javafx webkit is used. I hope adoptjdk included support for all javafx features in JDK8, I really need webkit to work!

I'm glad for your efforts to provide a free LTS JDK/RE 8. Alas, a dropin replacement for Oracle JDK/JRE 8 without full JavaFX support isn't a real dropin replacement.

We need JavaFX support for Selenium testing with JBrowserDriver (https://github.com/MachinePublishers/jBrowserDriver) for headless UI testing on a Jenkins build server. A really good Java-only solution. The other browser supporting headless mode is Chrome. But it's a PITA to get running. We finally gave up on it because we've got better things to do.

Because JBrowserDriver uses the HtmlKit component from JavaFX it breaks on current OpenJDK 8 disttributions. Certainly there are many other Open Source and propriertary applications that won't work without JavaFX.

If help is needed e.g. for testing a pre release and feedback I'd be glad to provide it. We use AdoptOpenJDK with Open J9 VM for compilation and as a runtime for WebSphere Liberty on our developer machines machines and for compilation and as (maven) test runtime. The only exception at the moment are our Selenium tests.

OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_202-b08) doesn't have JavaFX.
How to include ?

OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_202-b08) doesn't have JavaFX.
How to include ?

In the short term I'd head over to OpenJFX and ask their community - it will be a little while before we sort out the story here.

Hello,

is there any information when the javafx will be available in AdoptOpenJDK 8. We really need it.

A possible workaround:
I am working on Ubuntu 18.04 system and use the AdoptOpenJDK 8u202-b08 version.
To get javafx running i copied all necessary files from the Oracle JDK 1.8.0_201 version to the AdoptOpenJDK. Following the files you need to copy:

javafx-src.zip
bin/javafxpackager
jre/lib/javafx.properties
jre/lib/jfxswt.jar
jre/lib/ext/jfxrt.jar
jre/lib/javafx.properties
jre/lib/amd64/libjavafx_font_freetype.so
jre/lib/amd64/libjfxwebkit.so
jre/lib/amd64/libjfxmedia.so
jre/lib/amd64/libjavafx_iio.so
jre/lib/amd64/libjavafx_font_t2k.so
jre/lib/amd64/libfxplugins.so
jre/lib/amd64/libjavafx_font_pango.so
jre/lib/amd64/libjavafx_font.so
jre/lib/amd64/libglass.fo
jre/lib/amd64/libprism_common.so
jre/lib/amd64/libprism_es2.so
jre/lib/amd64/libprism_sw.so
lib/ant-javafx.jar
lib/javafx-mx.jar

I do not know if you need the exact the same files on Windows, but I hope it will help for now to get your application running with AdoptOpenJDK.

@karianna any news?

@karianna any news?

It's fairly high up the list, but we have some other burning priorities first (Installers and JDK12)

@karianna what do you need to get javafx inside AdoptOpenJDK?

I think we just need to add the correct libs to the existing JRE / JDK bundle and then make that available as a separate download and via installers as well. So likely some Jenkins Groovy / Bash scripting, some installer updates and then some API and web work.

I have managed to build the OpenJFX 1.8 on a windows 10 machine, with the jfxwebkit.dll, etc, also built. Tests out fine. It was a mighty painful exercise, the build guides for openjfx around on the web are variously insufficiently precise on certain features of exactly which versions of tooling packages work together, and which packages are best loaded by hand and not downloaded with cygwin. PATH order is also crucial to pick up the right compilers, the right make, and so forth. It can be done.

MacOS and Linux distribs also missing JavaFX libs...

@karianna as part of this issue, will OpenJFX be provided in the MacOS & Linux distributions as well? If so, then can you please update the Issue title to reflect scope.

I just make the switch on Windows due to Ninite. Now several programs no longer function, and I'm going down the rabbit-hole to see how to fix without reverting to oracle proprietary. We really need a drop-in replacement that just works as a drop-in replacement.
I appreciate that this is a lot of effort by several people, and do not intend disrespect or disregard for the work put in. I'm just pointing out an issue. Now that adoptopenjdk is going to be seeing a lot of new traffic as a result of Oracle's actions, we don't want less technical people thinking OpenJDK is junk because things won't work.

@Sakata-MC The community will be working on OpenFX and making it a first-class citizen. If you're looking for extra support in those efforts see the options at adoptopenjdk.net/support.html

@Sakata-MC @kariana Amazon Correto contains JFX libs for all OS. But don’t have OpenJ9 JVM.

I also have been looking for javaFX support for iOS.

I was also looking for a drop-in-replacement for Oracle JDK 8 and sadly, none of the alternatives make the cut. Either Win32 or Mac Support ist missing (all but AdoptOpenJDK) and/or there is no JavaFX with WebKit and javafxpackager.

I really wonder what can have a higher priority than having feature parity. The prio should be increased a lot. The project is really heavy behind...

@alexhass Pull Requests and support is welcome! - else you can look to adoptopenjdk.net/support.html to get features expedited.

I will try this distribution that I found by chance:
https://www.azul.com/downloads/zulu/zulufx/

Didn't know that there is a free and unrestricted community version of the Zulu JRE/JDK.

The Webkit DLLs are present. I think the other JavaFX artifacts are complete too:

zulu8.38.0.13-ca-fx-jdk8.0.212-win_x64\bin\javafxpackager.exe
zulu8.38.0.13-ca-fx-jdk8.0.212-win_x64\jre\bin\javafx_font.dll
zulu8.38.0.13-ca-fx-jdk8.0.212-win_x64\jre\bin\javafx_iio.dll
zulu8.38.0.13-ca-fx-jdk8.0.212-win_x64\jre\bin\jfxmedia.dll
zulu8.38.0.13-ca-fx-jdk8.0.212-win_x64\jre\binjfxwebkit.dll

I only copied the file names of files mentioned by other comments. There are more. Look for yourself and try it if you are in dire need of a dropin replacement.

@jmsdo You can also try Liberica JDK. https://www.bell-sw.com/

Any news if this is going to be ready in "MAy 2019" milestone?

@juliojgd May is optimistic, it'll probably be June

This issue is getting more important since the latest docker image of OpenJDK switched to the JDK from AdoptOpenJDK.
Before it has been possibel to install JavaFX using "apt get install openjfx".

This does no longer work and broke the build for us.
Propably a lot of guys out there are looking for the reasons JavaFX is no longer available in their docker image...

https://github.com/docker-library/openjdk/blob/282961c4ca0be09af7a556e38b8d5be0c2db0608/8/jdk/Dockerfile

This is the commit that changed the behavior:
https://github.com/docker-library/openjdk/commit/3eb0351b208d739fac35345c85e3c6237c2114ec#diff-fef076ee1e5f270f2c5a93d075150919

As my company needed openjfx 8 for adoptopenjdk, I compiled it. You can build it yourself https://benjamin-brummer.de/2019/06/03/build-openjfx-8-for-adoptopenjdk/ or trust me and take the latest build from here https://benjamin-brummer.de/downloads/. Simply extract it into your jdk.

@benbrummer Thanks for the build, however yours is missing the libjfxwebkit:
Caused by: java.lang.UnsatisfiedLinkError: Can't load library: C:\Program Files\AdoptOpenJDK\jdk-8.0.212.03-hotspot\jre\bin\jfxwebkit.dll

@Siedlerchr i uploaded a build with WebKit and Media

@benbrummer maybe create pull request?

Not sure where to pull to https://github.com/AdoptOpenJDK/openjdk-jfx is empty.

Assumption

  1. PR for changing git-hg to get the sources to Github.
  2. PR for changing the code on Github to be buildable with AdoptOpenJDK as target
  3. PR for Building against other Platforms (At its best no need for this)
  4. Integration in the Build System?

Second PR would be easy, but i only build OpenJFX for Windows and only OpenJFX 8

Not sure where to pull to https://github.com/AdoptOpenJDK/openjdk-jfx is empty.

Assumption

  1. PR for changing git-hg to get the sources to Github.

We may not need to even do that assuming we don't need to hold patches over what's in https://github.com/javafxports/openjdk-jfx - @johanvos - if we build OpenJFX at Adopt do we need to set a vendor string or anything like that?

  1. PR for changing the code on Github to be buildable with AdoptOpenJDK as target

I think it would just be a case of setting up a Jenkins build pipeline to build OpenJFX (nightly) and release versions

  1. PR for Building against other Platforms (At its best no need for this)

All part of the pipeline above. I think one of the things holding us up was some infrastructure work to install the OpenJFX dependencies

https://github.com/AdoptOpenJDK/openjdk-infrastructure/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+OpenJFX

  1. Integration in the Build System?

Second PR would be easy, but i only build OpenJFX for Windows and only OpenJFX 8

https://github.com/javafxports/openjdk-jfx is not sufficient
We need a mirror of
http://hg.openjdk.java.net/openjfx/8u/rt/
http://hg.openjdk.java.net/openjfx/9/rt/ (eol)
http://hg.openjdk.java.net/openjfx/10/rt/ (eol)
http://hg.openjdk.java.net/openjfx/11/rt/
http://hg.openjdk.java.net/openjfx/12/rt/
http://hg.openjdk.java.net/openjfx/jfx-dev/rt would be 13

The instructions from https://github.com/AdoptOpenJDK/openjdk-build/blob/master/README.md
jfx - Build OpenJFX, defaults to https://github.com/AdoptOpenJDK/openjdk-jfx
are not enough. Like for the OpenJDK (jdk8u, jdk9u...). we need the same for OpenJFX.

We just realised that Windows dlls are missing for AdoptOpenJDK 8u212 + OpenJFX 8 Overlay. To run a javafx application we had additionally to install Visual C++ 2015-2019 Redistributable https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads.

On Lubuntu 19.04 OpenJDK-8-JDK is missing JavaFX. Does it mean that it's not possible anymore with JavaFX for Java 8? I have to go to Java 11 if I want to make Android apps?

It is still possible to use JavaFX with Java 8 @DanielMartensson .

The problem here is just that some distributions of Java don't include JavaFX or include it seperately.

To further complicate things, Ubuntu used to have a seperate openjfx 8 package but they got rid of it and now only have an openjfx 11 package. As a possible workaround you might be able to add repositories for the old version of Ubuntu and install the old openjfx package, but I havent tried this personally. More details here: https://askubuntu.com/questions/1088281/openjfx-11-after-18-10-upgrade

This is the docker file that works for me - including JavaFX:

FROM openjdk:8

RUN apt-get update && \
    apt-get install -y --no-install-recommends imagemagick openjfx git \
    && rm -rf /var/lib/apt/lists/* \
    && cp /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/jfxrt.jar /usr/local/openjdk-8/jre/lib/ext \
    && cp /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/javafx.properties /usr/local/openjdk-8/jre/lib \
    && cp /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jfxswt.jar /usr/local/openjdk-8/jre/lib \
    && cp /usr/lib/jvm/java-8-openjdk-amd64/lib/ant-javafx.jar /usr/local/openjdk-8/lib \
    && cp /usr/lib/jvm/java-8-openjdk-amd64/lib/javafx-mx.jar /usr/local/openjdk-8/lib

ENV JAVA_HOME /usr/local/openjdk-8/

Hey @jschneider , which version of Ubuntu have you tested this on? As I noted above I think the "openjfx" package has now been changed to only support Java 11 in the new version of Ubuntu (since 18.10) so this script might no longer work.

Also if you don't mind me asking, why not just set JAVA_HOME to /usr/lib/jvm/java-8-openjdk-amd64/ instead of copying all those files to the other directory?

I am extending the image from "openjdk:8".
The last time I checked it worked fine.

If they updated that image, it may be broken. I just build once a week.

JAVA_HOME is set to /usr/local/openjdk-8/ since the location of the JDK has changed in the base image.

I am not saying this is the best way to do it - just that it is "good enough" for me.

@jschneider that's useful, it works for me on CentOS 7. Thank you!

Ah, understood. I am not too familiar with docker so I didn't realize it provides a copy of the JDK in that way. Makes sense. Also that image seems to be based on Debian Stretch so the bug I was talking about doesn't apply. Sorry for the confusion

I solved my issue. I had to add libopenjfx-jni too.

1. Install OpenJDK 8

        sudo apt-get install openjdk-8-jdk

2. Install OpenJFX 8, not OpenJFX 11

Open this:

    cd /etc/apt
    sudo nano sources.list

Paste this:

     deb http://de.archive.ubuntu.com/ubuntu/ bionic universe

Run this:

    sudo apt-get update
    sudo apt install openjfx=8u161-b12-1ubuntu2 libopenjfx-java=8u161-b12-1ubuntu2 libopenjfx-jni=8u161-b12-1ubuntu2

Done

Can we expect resolving this issue in the near future?
This year?

Can we expect resolving this issue in the near future?
This year?

Probably this year yes, but there's a bunch of higher priorities we're tackling first. If you need something expedited then there are a couple of commercial support options (adoptopenjdk.net/support)

We have a desktop software product (needing Java-FX and using some reflection hacks that make java-9 difficult) that I only recently realized is probably in license-abuse of Oracle's new license.

I'm using Azul's Java8+FX u222 (zulu8.40.0.25-ca-fx-jdk8.0.222-win_i686) without issue.

Would be really nice if AdoptOpenJDK would include the JavaFX runtime in their java-8 distribution.

_of course, it would be nicer if I can refactor my reflection-hacking code off my codebase and simply move to java-11_ (or, for that matter, java 12, since that type inference looks really nice).

https://www.jetbrains.com/research/devecosystem-2018/java/
84% of users use Java8 - I would think an API not being supported would be a top priority.

@agilesal 83% as of 2019 … 😉 https://www.jetbrains.com/lp/devecosystem-2019/java/

One year passed... Still not fixed?

One year passed... Still not fixed?

Only for Linux. I'm using OpenJFX for Android and Iphone development.

Best way is to make Android work with OpenJFX 11. Then all Android Java user ers will move to Java 11.

Yes, but as @beatngu13 already stated, Java 8 is still the most used Java version: https://www.jetbrains.com/lp/devecosystem-2019/java/
So support for this is still required!

OpenJFX 8 is unmaintained. As long this does not change, we‘re not going to include it in anything. If you want to change that, head to the OpenJFX channel on the AdoptOpenJDK Slack.

Understood. Switching to Azul's Java8+FX

Understood. Switching to Azul's Java8+FX

There is also Liberica, which contains FX.
https://bell-sw.com/pages/java-8u232/

Understood. Switching to Azul's Java8+FX

There is also Liberica, which contains FX.
https://bell-sw.com/pages/java-8u232/

I tried that, and it did not work for Gluon HQ JavaFX for Android/Iphone development.
AdoptOpenJDK 8 with OpenJFX 8 works for me under Linux.

I updated my downloads for the JavaFX-Overlay.
https://benjamin-brummer.de/downloads/
Additionally i added a download for the necessary Windows-Dlls.
You can either download the Overlay + the Dlls and copy it over your existing AdoptOpenJDK or download the AIO-Zip files.

Do that work with Gluon HQ JavaFX?

There is also Liberica, which contains FX.
https://bell-sw.com/pages/java-8u232/

@rafik777, how can you tell that it contains FX? I'm primarily looking for something that has JavaFX preinstalled so that I can build my ancient Java app. But when I built it with gradle using a Docker image bellsoft/liberica-openjdk-debian:8, it reported a bunch of errors as below:

/home/me/workspace/myapp//MainApplication.java:3: error: package javafx.application does not exist
import javafx.application.Platform;
                         ^
/home/me/workspace/myapp//MainApplication.java:4: error: package javafx.beans.property does not exist
import javafx.beans.property.BooleanProperty;
                            ^

Do you know if I did something wrong?

So how are people adding JavaFX to their AdoptOpenJDK on Linux, namely Ubuntu/Debian derivatives? I see it mentioned in this thread, but I'm not a build expert, to pick up on it from small clues and mentions.

So how are people adding JavaFX to their AdoptOpenJDK on Linux, namely Ubuntu/Debian derivatives? I see it mentioned in this thread, but I'm not a build expert, to pick up on it from small clues and mentions.

You need to have OpenJDK 8 and OpenJFX 8 installed.

Install OpenJDK 8

sudo apt-get install openjdk-8-jdk

Install OpenJFX 8
Open sources.list file
cd /etc/apt sudo nano sources.list
Paste this into the file and save and close
deb http://de.archive.ubuntu.com/ubuntu/ bionic universe

Run these code inside the terminal
sudo apt-get update sudo apt install openjfx=8u161-b12-1ubuntu2 libopenjfx-java=8u161-b12-1ubuntu2 libopenjfx-jni=8u161-b12-1ubuntu2 openjfx-source=8u161-b12-1ubuntu2
Then
sudo apt-mark hold libopenjfx-java libopenjfx-jni openjfx openjfx-source

There is also Liberica, which contains FX.
https://bell-sw.com/pages/java-8u232/

@rafik777, how can you tell that it contains FX? I'm primarily looking for something that has JavaFX preinstalled so that I can build my ancient Java app. But when I built it with gradle using a Docker image bellsoft/liberica-openjdk-debian:8, it reported a bunch of errors
Do you know if I did something wrong?

@thaiphv I think you should build own docker image from this Dockerfile:

https://github.com/bell-sw/Liberica/blob/master/docker/repos/liberica-openjdk-debian/8/Dockerfile

but change this
ARG LIBERICA_USE_LITE=1
to
ARG LIBERICA_USE_LITE=0

@thaiphv I think you should build own docker image from this Dockerfile:

https://github.com/bell-sw/Liberica/blob/master/docker/repos/liberica-openjdk-debian/8/Dockerfile

but change this
ARG LIBERICA_USE_LITE=1
to
ARG LIBERICA_USE_LITE=0

@rafik777, thank you for the suggestion. I'll give it a try.

I'm using Mac OS Catalina. I was running my project on adoptopenjdk11 with org.openjfx.javafxplugin plugin. Unfortunately I ran into a security issue that prevents OpenCV from accessing my webcam and this caused OpenJDK 11 to crash. I have not found a fix for the security issue.

I then decided to install adoptopenjdk8 to see if this would cause similar crash. Unfortunately, found out that org.openjfx.javafxplugin cannot be used with OpenJDK 8 and then I reached this topic to find out, that JavaFX is not bundled with OpenJDK 8.

I am currently looking into compiling org.openjfx.javafxplugin against OpenJDK 8 (https://github.com/openjfx/javafx-gradle-plugin/issues/61).

So, any progress on this? Also, if anyone has a workaround for Mac OS Catalina, feedback is highly appreciated.

I think it is clear now that the AdoptOpenJDK project has no interest in helping us with our JavaFX problems.

The only real way forwards is to drop AdoptOpenJDK. Did you try the Liberica JDK from bell-sw.com? That is the one distribution I found that ticks all the boxes.

The situation has not changed since I commented the last time (and I do not speak on behalf of the TSC): OpenJFX 8 is currently not maintained. And we are not willing to build and distribute something that contains known security vulnerabilities. Doing so would be gross negligence.

AdoptOpenJDK members reached out to both Azul and Bell Soft to collaborate on OpenJFX 8. This efforts have not been successful for reasons that I do not know about. We still plan to build and distribute OpenJFX 11, but we're short-handed.

AdoptOpenJDK is a project of volunteers. Very few people are paid by sponsors and they usually work on areas that are of most interest to the sponsors. OpenJFX apparently is not one of them. If you want to see progress in an area, either volunteer or sponsor the effort.

You can use this docker image, it contains javafx, actually am running this version, it works good.

amazoncorretto:8

https://hub.docker.com/_/amazoncorretto

Additional can set this lines in the Dockerfile:
apt-get update && \
apt-get install -y —no-install-recommends imagemagick openjfx git \
&& rm -rf /var/lib/apt/lists/*

@chilcho1939
OpenJFX in Amazon Corretto 8 has not been updated for a long time.
If you check javafx.properties, you can understand.
And, OpenJFX is not be bundled from Corretto 11.
https://github.com/corretto/corretto-11/issues/1

Instead, I recommend you to use Liberica JDK.

As it stands, it is highly unlikely for AdoptOpenJDK to bundle OpenJFX. For why that is, what it would take to change it, and what the alternatives are, please see our FAQ on OpenJFX.

So how are people adding JavaFX to their AdoptOpenJDK on Linux, namely Ubuntu/Debian derivatives? I see it mentioned in this thread, but I'm not a build expert, to pick up on it from small clues and mentions.

You need to have OpenJDK 8 and OpenJFX 8 installed.

Install OpenJDK 8

sudo apt-get install openjdk-8-jdk

Install OpenJFX 8
Open sources.list file
cd /etc/apt sudo nano sources.list
Paste this into the file and save and close
deb http://de.archive.ubuntu.com/ubuntu/ bionic universe

Run these code inside the terminal
sudo apt-get update sudo apt install openjfx=8u161-b12-1ubuntu2 libopenjfx-java=8u161-b12-1ubuntu2 libopenjfx-jni=8u161-b12-1ubuntu2 openjfx-source=8u161-b12-1ubuntu2
Then
sudo apt-mark hold libopenjfx-java libopenjfx-jni openjfx openjfx-source

Very difficult to do this in Debian Buster release, unfortunately. The jni package needs a bunch of dependency which are not even available anymore.

root@DESKTOP-8N43UKC:/etc/apt# apt install openjfx=8u161-b12-1ubuntu2 libopenjfx-java=8u161-b12-1ubuntu2 libopenjfx-jni=8u161-b12-1ubuntu2
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libopenjfx-jni : Depends: libavcodec57 (>= 7:3.4.2) but it is not going to be installed or
                           libavcodec-extra57 (>= 7:3.4.2) but it is not going to be installed
                  Depends: libavformat57 (>= 7:3.4.2) but it is not going to be installed
                  Depends: libgtk2.0-0 (>= 2.24.0) but it is not going to be installed
                  Depends: libjpeg8 (>= 8c) but it is not installable
                  Depends: libxslt1.1 (>= 1.1.25) but it is not going to be installed
 openjfx : Depends: openjdk-8-jre but it is not going to be installed

I updated my downloads for the JavaFX-Overlay.
https://benjamin-brummer.de/downloads/
Additionally i added a download for the necessary Windows-Dlls.
You can either download the Overlay + the Dlls and copy it over your existing AdoptOpenJDK or download the AIO-Zip files.

is this compatible with AdoptOpenJDK11?

To install on Open JDK 8
sudo apt install openjfx=8u161-b12-1ubuntu2 libopenjfx-java=8u161-b12-1ubuntu2 libopenjfx-jni=8u161-b12-1ubuntu2

So how are people adding JavaFX to their AdoptOpenJDK on Linux, namely Ubuntu/Debian derivatives?

You can use my repo which has OpenJFX8 with all the ojdkbuild patches:
https://github.com/jschwartzenberg/openjfx8

Make sure you have a recent OpenJDK 8 and, do a git clone of the repo and use sh ./gradlew zips to build the overlay zip.

Any other version of OpenJFX8 that I have seen has known security vulnerabilities.

apt-mark hold libopenjfx-java libopenjfx-jni openjfx openjfx-source

@samikrc - https://askubuntu.com/a/1062168 helped.

I updated my downloads for the JavaFX-Overlay.
https://benjamin-brummer.de/downloads/
Additionally i added a download for the necessary Windows-Dlls.
You can either download the Overlay + the Dlls and copy it over your existing AdoptOpenJDK or download the AIO-Zip files.

Hi...Do you have an updated overlay? Windows x64

Hi...Do you have an updated overlay? Windows x64

For Windows, I recommend the builds from https://github.com/ojdkbuild/ojdkbuild

Hi...Do you have an updated overlay? Windows x64

For Windows, I recommend the builds from https://github.com/ojdkbuild/ojdkbuild

Hi, perhaps I'm missing something by where is the JFX overlays in this repo?

Hi, perhaps I'm missing something by where is the JFX overlays in this repo?

It in each release, see for instance:
https://github.com/ojdkbuild/ojdkbuild/releases/tag/java-1.8.0-openjdk-1.8.0.275-1.b01

I have no idea if these overlays also work with the binaries from Adopt. I don't know the advantages of the Adopt binaries.

@wicadmin @jschwartzenberg
Hi, I think you had better use Liberica JDK[1] or ZuluFX[2].
See the FAQ[3] of AdoptOpenJDK.
I recommend Liberica JDK!

Liberica and ZuluFX don't offer overlays.
If you need them, maybe you can download SDK from Gluon[4].
But Gluon doesn't offer JavaFX 8 and LTS release for free.
Also, ZuluFX doesn't offer OpenJFX LTS[5] except Zulu 8.

[1] https://bell-sw.com/pages/downloads/?package=jdk-full
[2] https://www.azul.com/downloads/zulu-community/?package=jdk-fx
[3] https://adoptopenjdk.net/faq.html#openjfxfaq
[4] https://gluonhq.com/products/javafx/
[5] https://docs.azul.com/zulu/zulurelnotes/ZuluReleaseNotes/ReleaseDetails1528-1335-1334-1143-1142-850-849-742-741-636-respin.htm

@wicadmin we switched over to Amazon Coretto https://aws.amazon.com/corretto/

I've tried every single one of them. Some have old JFX components. I'm stuck with Java 8 for our application. Due to an issue of some sort with the JFX components in Oracle (application becomes unresponsive), we've switched to AdoptOpenJDK 8 and everything works with @benbrummer overlay except jfxwebkit.dll giving this error:

java.lang.UnsatisfiedLinkError: com.sun.webkit.WebPage.twkUpdateRendering(J)V
at com.sun.webkit.WebPage.twkUpdateRendering(Native Method)
at com.sun.webkit.WebPage.updateRendering(WebPage.java:648)
at com.sun.webkit.WebPage.updateContent(WebPage.java:641)
at com.sun.javafx.sg.prism.web.NGWebView.update(NGWebView.java:74)
at javafx.scene.web.WebView.handleStagePulse(WebView.java:999)
at javafx.scene.web.WebView.lambda$new$0(WebView.java:280)
at com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:399)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:398)
at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:422)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:518)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:498)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:491)
at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:319)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$3(WinApplication.java:177)
at java.lang.Thread.run(Thread.java:748)

jfxwebkit.dll from other distributions seems to now fix this but now I'm unsure what is missing as it is a slightly smaller size that what @benbrummer one has.

@benbrummer
JavaFX in Corretto is very old version "8u202".
And it is not supported in Corretto 11[1].
So, I think it should not be used.

[1] https://github.com/corretto/corretto-11/issues/1

@wicadmin @jschwartzenberg
Hi, I think you had better use Liberica JDK[1] or ZuluFX[2].
See the FAQ[3] of AdoptOpenJDK.
I recommend Liberica JDK!

Do you know which patches ZuluFX includes? Last time I checked they did not publish their sources along the binaries and one had to request them for a transfer fee.
I have had a positive call with BellSoft regarding the patches they use for LibericaFX 8 and whether they can provide insight into those. I do not know if they already managed to put this in place.

@wicadmin we switched over to Amazon Coretto https://aws.amazon.com/corretto/

As mentioned the version of OpenJFX 8 included with Corretto is old and has known vulnerabilities. Their version also misses WebKit support. I created some PRs a while back but they are essentially ignoring them.

I've tried every single one of them. Some have old JFX components. I'm stuck with Java 8 for our application.

Which problems did you run into with the builds from the ojdkbuild project? The reason I based my OpenJFX 8 repository on ojdkbuild is because I needed up to date non-Windows builds and I wanted to have insight in all the patches that were included. None of the other builds could satisfy that at the time.

If someone wants AdoptOpenJDK to provide builds with OpenJFX 8 (or newer), we're happy to do so if a credible contributor of patches steps up that knows what they're doing. Providing builds is easy, keeping OpenJFX 8 up-to-date is not.

If someone wants AdoptOpenJDK to provide builds with OpenJFX 8 (or newer), we're happy to do so if a credible contributor of patches steps up that knows what they're doing. Providing builds is easy, keeping OpenJFX 8 up-to-date is not.

What are the advantages of the AdoptOpenJDK builds? For Windows users, I point to the ojdkbuild project (which has a RedHat engineer behind it). For non-Windows users, their operating system package manager usually has the best OpenJDK build.

Based on the ojdkbuild work, I am building an OpenJDK variant with OpenJFX 8 using the RedHat sources. What would switching or providing builds using Adopt gain me?

For Windows users, I point to the ojdkbuild project (which has a RedHat engineer behind it).

We have a dozen (or so) Red Hat engineers :wink:

For non-Windows users, their operating system package manager usually has the best OpenJDK build.

[citation needed]

I agree for Red Hat flavours. The packages of Debian and its flavours have had problems historically, especially around the JPMS and jpackage.

Based on the ojdkbuild work, I am building an OpenJDK variant with OpenJFX 8 using the RedHat sources. What would switching or providing builds using Adopt gain me?

If you're happy with what you have, that's great, especially if you like building OpenJDK yourself. I only wanted to note that we're not against offering OpenJFX 8 but haven't done so in the past because we didn't found anybody who could maintain it. And if somebody would volunteer, we're happy to offer the necessary assistance.

We have a dozen (or so) Red Hat engineers wink

That's good to know :) Maybe you could also tag along the one behind the @ojdkbuild work?

_[citation needed]_

I agree for Red Hat flavours. The packages of Debian and its flavours have had problems historically, especially around the JPMS and jpackage.

I never ran into issues doing yum/apt/pacman/etc. installations of the OpenJDK. If there are perceived problems with the Debian packages, has it been considered to contribute directly to make those better?

If you're happy with what you have, that's great, especially if you like building OpenJDK yourself. I only wanted to note that we're not against offering OpenJFX 8 but haven't done so in the past because we didn't found anybody who could maintain it. And if somebody would volunteer, we're happy to offer the necessary assistance

My point is that I see no benefit in introducing OpenJFX to AdoptOpenJDK as I am not aware of the benefits of the Adopt binaries. As you see above there are requests to provide OpenJFX for Windows. This is readily available in a different project, which is less known with Adopt mostly suggesting adopting its own binaries.

What would be lost if Adopt would stop providing Windows binaries and point users to the ojdkbuild project instead? At least that would gain them OpenJFX support.

If there are perceived problems with the Debian packages, has it been considered to contribute directly to make those better?

Not really. Doing Debian packages right is difficult and if the package maintainers cannot figure it out themselves, it's unlikely that we can. On top of that, the release policy of the Linux distributions does not play well with the OpenJDK schedule (you can have AdoptOpenJDK 15 that runs on Ubuntu Xenial). Then it's nigh to impossible to fullfil the JCP requirements in the context of an OSS Linux distribution. We're slowly getting there without the constraints the others have.

This is readily available in a different project, which is less known with Adopt mostly suggesting adopting its own binaries.

It's totally fine to use that under the provision it's up to date (or you know what you're doing). If enterprise customers ask for Java with JavaFX 8, I point them to Oracle JDK.

What would be lost if Adopt would stop providing Windows binaries and point users to the ojdkbuild project instead? At least that would gain them OpenJFX support.

I cannot really comment on that because I'm not familiar with the ojdkbuild project. Our mission is to offer high-quality OpenJDK binary builds that match OpenJDK as closely as possible and can be used without usage restrictions on a wide range of platforms. If all other vendors stopped releasing their JDKs, we would still be here and offer a free alternative to Oracle JDK. If people prefer to use something else (Liberica, SapMachine, ...), that's fine for me. We even offer multiple JDKs ourselves with Dragonwell coming on board soon and we do QA for Amazon Corretto. AdoptOpenJDK is less about the binary builds themselves and more about being a home for OpenJDK builds and related projects that has the necessary resources (infra, people, money).

Not really. Doing Debian packages right is difficult and if the package maintainers cannot figure it out themselves, it's unlikely that we can.

Then I am curious what issues are perceived because fact is that a supported version of Debian/Ubuntu allows installing the OpenJDK straight from their repositories and you get the latest update for the LTS versions (8 and 11). We should be careful to avoid discussing issues that might not actually be there.

If enterprise customers ask for Java with JavaFX 8, I point them to Oracle JDK.

That will not give you sources or any real insights, so you loose some advantages of the OpenJDK. Unless I am mistaken and Oracle provides the source code for their builds? Binaries with matching instructions to compile them from source is one of the biggest advantages of the OpenJDK.

Our mission is to offer high-quality OpenJDK binary builds that match OpenJDK as closely as possible and can be used without usage restrictions on a wide range of platforms.

There are no OpenJDK builds with usage restrictions. This is a simple consequence of the GPL which provides the freedom to use the software for any purpose.

AdoptOpenJDK is less about the binary builds themselves and more about being a home for OpenJDK builds and related projects that has the necessary resources (infra, people, money).

That is really great. But then it would indeed be an idea to promote builds from other sources too? Possibly it could be as simple as an FAQ entry with "What about OpenJFX?" and pointing to a list of alternatives that do bundle it (with a note that you cannot vouch for those builds). It could also be a more elaborate overview including QA services.

Then I am curious what issues are perceived because fact is that a supported version of Debian/Ubuntu allows installing the OpenJDK straight from their repositories and you get the latest update for the LTS versions (8 and 11).

As an example: https://bugs.launchpad.net/ubuntu/+source/openjdk-14/+bug/1868699

That will not give you sources or any real insights, so you loose some advantages of the OpenJDK.

Yes, but according to my knowledge it's the only vendor that has a fully patched Java FX 8 and will do so until 2022. Most people don't care about being able to compile from source.

There are no OpenJDK builds with usage restrictions. This is a simple consequence of the GPL which provides the freedom to use the software for any purpose.

You're misinterpreting what I wrote. OpenJDK is a source-only project (mostly). We're here to ensure there's at least one OpenJDK binary build.

Possibly it could be as simple as an FAQ entry with "What about OpenJFX?" and pointing to a list of alternatives that do bundle it (with a note that you cannot vouch for those builds).

https://adoptopenjdk.net/faq.html#openjfxfaq

Then I am curious what issues are perceived because fact is that a supported version of Debian/Ubuntu allows installing the OpenJDK straight from their repositories and you get the latest update for the LTS versions (8 and 11).

As an example: https://bugs.launchpad.net/ubuntu/+source/openjdk-14/+bug/1868699

Thanks! That provides better insight in why there's Adopt :)

Yes, but according to my knowledge it's the only vendor that has a fully patched Java FX 8 and will do so until 2022.

https://adoptopenjdk.net/faq.html#openjfxfaq

Nice!! Maybe you could point to https://github.com/ojdkbuild/ojdkbuild too? The intent is until May 2026.

Most people don't care about being able to compile from source.

Citation needed ;)

Nice!! Maybe you could point to https://github.com/ojdkbuild/ojdkbuild too? The intent is until May 2026.

Is openjfx-8.0.202-1.b15.ojdkbuild.windows.x86_64.zip (source: https://github.com/ojdkbuild/ojdkbuild/releases/tag/java-1.8.0-openjdk-1.8.0.275-1.b01) what it says it is? That would be worrisome. Or to ask differently: Where can I find more info what patches have been applied?

Where can I find more info what patches have been applied?

All the patches are here: https://github.com/ojdkbuild/upstream_openjfx-8u

That tree only builds on Windows however. It also lacks the original history. So when I asked about GNU/Linux support, I was suggested it would be better to reimport the Mercurial repository with its history and put the relevant patches on top.
https://github.com/ojdkbuild/ojdkbuild/issues/87#issuecomment-502648409

As it seemed nobody was doing this, I did it myself:
https://github.com/jschwartzenberg/openjfx8

I added a few more fixes such as one to make it compile on distributions with a newer glibc. That repository should compile on at least RHEL6 (and higher) and recent Fedora versions.

The jfxwebkit.dll seems buggy. @benbrummer version on 232 is much larger than the one from ojdkbuild. When this is used (jfx panel with webview), the application goes into a non-responding state assumingly when there is some network conditions like TCP connection reset.

The jfxwebkit.dll seems buggy. @benbrummer version on 232 is much larger than the one from ojdkbuild. When this is used (jfx panel with webview), the application goes into a non-responding state assumingly when there is some network conditions like TCP connection reset.

Are you combining the overlay with the Adopt build or are you using the full ojdkbuild? In the latter case, I would suggest reporting an issue in the ojdkbuild issue tracker. Preferably with a test case. In my experience a WebView through WebKit works fine with the ojdkbuild builds.

The jfxwebkit.dll seems buggy. @benbrummer version on 232 is much larger than the one from ojdkbuild. When this is used (jfx panel with webview), the application goes into a non-responding state assumingly when there is some network conditions like TCP connection reset.

Are you combining the overlay with the Adopt build or are you using the full ojdkbuild? In the latter case, I would suggest reporting an issue in the ojdkbuild issue tracker. Preferably with a test case. In my experience a WebView through WebKit works fine with the ojdkbuild builds.

Yes, I used the ojdkbuild and overlay the jfx from ojdkbuild.

Only the jfx items where webview/webkit is concerned seems to work better compiled around the 232 versions (from benbrummer) of openjdk but gives this error:

java.lang.UnsatisfiedLinkError: com.sun.webkit.WebPage.twkUpdateRendering(J)V

Unless some major cleanup was done, we're talking about 6 MB difference in the size of the jfxwebkit.DLL (the ojdkbuild being 6 MB less in size than the @benbrummer one.

I'm wondering if this check for the event thread addition on this patch is causing the non-responding javaw.exe process in windows?
https://github.com/jschwartzenberg/openjfx8/commit/5ec80a12039b73c1d27fcab9bde17b4b6852516c#diff-ddb457cb213b5c9647b2d6ed7ac555851c162cddd5c0ea2a371973755edd75cd

Yes, I used the ojdkbuild and overlay the jfx from ojdkbuild.

I did most testing on Windows with 8u222 myself. Maybe you could see if older builds work better.

Unless some major cleanup was done, we're talking about 6 MB difference in the size of the jfxwebkit.DLL (the ojdkbuild being 6 MB less in size than the @benbrummer one.

I suspect that this is due to how compilation is done and the @benbrummer one has more statically linked libraries. The @ojdkbuild one seems to use dynamic linking and includes quite a few extra DLLs.

I'm wondering if this check for the event thread addition on this patch is causing the non-responding javaw.exe process in windows?
jschwartzenberg/openjfx8@5ec80a1#diff-ddb457cb213b5c9647b2d6ed7ac555851c162cddd5c0ea2a371973755edd75cd

If you could pinpoint the problem to a regression starting with a particular build and report a ticket, I guess that would already be very helpful in solving this.

The Windows build of OpenJFX is rather complicated (IMO). If you have a GNU/Linux option to test and the problem is reproduceable there, it would be easier to pinpoint the exact commit. I could then help you if you have trouble building the OpenJFX overlay from my repository.

I did most testing on Windows with 8u222 myself. Maybe you could see if older builds work better.

Yes, I've just now tested the odjkbuild JRE with odkjbuild openjfx 8 and only swapped in the jfxwebkit.dll from @benbrummer and I seem to have complete success.

I suspect that this is due to how compilation is done and the @benbrummer one has more statically linked libraries. The @ojdkbuild one seems to use dynamic linking and includes quite a few extra DLLs.

Perhaps, whatever it is, it seems to be make the difference when statically compiled.

The Windows build of OpenJFX is rather complicated (IMO). If you have a GNU/Linux option to test and the problem is reproduceable there, it would be easier to pinpoint the exact commit. I could then help you if you have trouble building the OpenJFX overlay from my repository.

Unfortunately this is a windows only app. I will however see how it runs on Linux.

Perhaps, whatever it is, it seems to be make the difference when statically compiled.

Or it's the version difference. WebKit changed quite a bit between updates, also new versions of WebKit (fixing vulnerabilities) were introduced.

Unfortunately this is a windows only app. I will however see how it runs on Linux.

The intent of these technologies would be that the same software can run on any platform supported by the runtime. It should be interesting to see if it works!

If there's a doc update we can make to the blog or website then PR's are welcome.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

detouched picture detouched  ·  21Comments

andrew-m-leonard picture andrew-m-leonard  ·  26Comments

M-Davies picture M-Davies  ·  97Comments

keirlawson picture keirlawson  ·  50Comments

andrew-m-leonard picture andrew-m-leonard  ·  95Comments