adoptium / temurin-build

Eclipse Temurin™ build scripts - common across all releases/versions
Apache License 2.0
1.03k stars 249 forks source link

JavaFX is missing in OpenJDK 8 Distributions #577

Closed SzentnerTsIT closed 4 years ago

SzentnerTsIT commented 6 years ago

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!

karianna commented 6 years ago

@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

arastoul commented 5 years ago

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

karianna commented 5 years ago

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

arastoul commented 5 years ago

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

alexhass commented 5 years ago

What Windows releases include JavaFX?

arastoul commented 5 years ago

@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)

alexhass commented 5 years ago

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.

alexhass commented 5 years ago

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

arastoul commented 5 years ago

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

alexhass commented 5 years ago

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.

arastoul commented 5 years ago

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

mharvey-gresham commented 5 years ago

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

tumagonx commented 5 years ago

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

scmikes commented 5 years ago

Any ETA with Oracle Java 8 EOL comming up?

Thanks Michael

yamadamn commented 5 years ago

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.

scmikes commented 5 years ago

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.

karianna commented 5 years ago

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

tumagonx commented 5 years ago

@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 commented 5 years ago

@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.

umigez commented 5 years ago

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!

jmsdo commented 5 years ago

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.

manju6 commented 5 years ago

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

karianna commented 5 years ago

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.

maddin79 commented 5 years ago

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.

polyn0m commented 5 years ago

@karianna any news?

karianna commented 5 years ago

@karianna any news?

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

Ciruman commented 5 years ago

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

karianna commented 5 years ago

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.

antonyfountain commented 5 years ago

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.

polyn0m commented 5 years ago

MacOS and Linux distribs also missing JavaFX libs...

fduser1 commented 5 years ago

@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.

Sakata-MC commented 5 years ago

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.

karianna commented 5 years ago

@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

polyn0m commented 5 years ago

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

Adi-18 commented 5 years ago

I also have been looking for javaFX support for iOS.

effad commented 5 years ago

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.

alexhass commented 5 years ago

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...

karianna commented 5 years ago

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

jmsdo commented 5 years ago

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\bin\jfxwebkit.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.

yamadamn commented 5 years ago

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

juliojgd commented 5 years ago

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

karianna commented 5 years ago

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

jschneider commented 5 years ago

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

benbrummer commented 5 years ago

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.

Siedlerchr commented 5 years ago

@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

benbrummer commented 5 years ago

@Siedlerchr i uploaded a build with WebKit and Media

polyn0m commented 5 years ago

@benbrummer maybe create pull request?

benbrummer commented 5 years ago

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

jsoref commented 5 years ago

https://github.com/javafxports/openjdk-jfx is a mirror...

karianna commented 5 years ago

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