# JavaFX in KNIME 4

**URL:** <https://forum.knime.com/t/javafx-in-knime-4/15597>\
**Category:** Node Development\
**Created:** [June 25, 2019, 10:33am UTC](https://forum.knime.com/t/javafx-in-knime-4/15597 "2019-06-25T10:33:04Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![qqilihq](https://forum-cdn.knime.com/user_avatar/forum.knime.com/qqilihq/32/50_2.png) [@qqilihq](https://forum.knime.com/u/qqilihq)\
**Post date:** [June 25, 2019, 10:33am UTC](https://forum.knime.com/t/javafx-in-knime-4/15597/1 "2019-06-25T10:33:04Z")

</div>

It seems that the JavaFX libraries are no longer included in KNIME 4 (tested with today’s nightly build on macOS). This means, the jBrowserDriver plugin for the Selenium Nodes (which requires JavaFX) will break:

E.g. KNIME 3.7.2:

```auto
/Contents/Eclipse/plugins/org.knime.binary.jre.macosx.x86_64_1.8.0.152-02/jre/Home/lib/jfxswt.jar

```

In the 4 nightly, this lib (and further related files) are missing.

Was removing JavaFX intentional or is this an oversight?

– Philipp

---

<div class="post-metadata">

**Author:** ![wiswedel](https://forum-cdn.knime.com/user_avatar/forum.knime.com/wiswedel/32/28273_2.png) [@wiswedel](https://forum.knime.com/u/wiswedel)\
**Post date:** [June 25, 2019, 10:58am UTC](https://forum.knime.com/t/javafx-in-knime-4/15597/2 "2019-06-25T10:58:50Z")

</div>

Certainly not intentional. We switched from Oracle Java to AdoptOpenJDK (details are [here](https://www.knime.com/faq#q37)).

It seems we (or you) should include one of [those](https://mvnrepository.com/artifact/org.openjfx/javafx/11)?  
(Ignorant about the version here – but wanted to get your feedback if that’s an option.)

---

<div class="post-metadata">

**Author:** ![qqilihq](https://forum-cdn.knime.com/user_avatar/forum.knime.com/qqilihq/32/50_2.png) [@qqilihq](https://forum.knime.com/u/qqilihq)\
**Post date:** [June 25, 2019, 11:05am UTC](https://forum.knime.com/t/javafx-in-knime-4/15597/3 "2019-06-25T11:05:50Z")

</div>

Hi Bernd,

thanks for the feedback. From my research, these packages are not available for Java 8; the minimum is 11 ☹ (I checked this option yesterday, as I had a similar issue on our CI environment with OpenJDK)

---

<div class="post-metadata">

**Author:** ![wiswedel](https://forum-cdn.knime.com/user_avatar/forum.knime.com/wiswedel/32/28273_2.png) [@wiswedel](https://forum.knime.com/u/wiswedel)\
**Post date:** [June 25, 2019, 11:56am UTC](https://forum.knime.com/t/javafx-in-knime-4/15597/4 "2019-06-25T11:56:20Z")

</div>

If that’s true then we are out of luck ☹ I could do more research but it seems you have done quite some already.  
We’ve been considering bumping to Java 11 but then decided not to as Java 8 is well supported and there wasn’t any apparent reason. This may change in the future.

Any other option?

---

<div class="post-metadata">

**Author:** ![qqilihq](https://forum-cdn.knime.com/user_avatar/forum.knime.com/qqilihq/32/50_2.png) [@qqilihq](https://forum.knime.com/u/qqilihq)\
**Post date:** [June 25, 2019, 12:25pm UTC](https://forum.knime.com/t/javafx-in-knime-4/15597/5 "2019-06-25T12:25:03Z")

</div>

Ok.

According to various tickets (eg. [here](https://github.com/AdoptOpenJDK/openjdk-build/issues/577)), there seem to be some more or less brittle solutions to get JavaFX into an OpenJDK (no one’s talking about licensing implications… not sure whether this is a good sign). All in all, this feels like a huge rabbit hole which I’m not willing/able to explore now.

Instead I’ll drop the jBrowser plugin from the upcoming 4.0 release.

Thanks,  
Philipp

---

<div class="post-metadata">

**Author:** ![s.roughley](https://forum-cdn.knime.com/user_avatar/forum.knime.com/s.roughley/32/366_2.png) [@s.roughley](https://forum.knime.com/u/s.roughley)\
**Post date:** [June 25, 2019, 4:43pm UTC](https://forum.knime.com/t/javafx-in-knime-4/15597/6 "2019-06-25T16:43:02Z")

</div>

I think this might cause @swebb a few problems too?

Steve

---

<div class="post-metadata">

**Author:** ![qqilihq](https://forum-cdn.knime.com/user_avatar/forum.knime.com/qqilihq/32/50_2.png) [@qqilihq](https://forum.knime.com/u/qqilihq)\
**Post date:** [June 25, 2019, 5:00pm UTC](https://forum.knime.com/t/javafx-in-knime-4/15597/7 "2019-06-25T17:00:59Z")

</div>

@s.roughley Thanks! In case there are others who depend on JavaFX I’d be really glad about some feedback and their experience.

---

<div class="post-metadata">

**Author:** ![swebb](https://forum-cdn.knime.com/user_avatar/forum.knime.com/swebb/32/369_2.png) [@swebb](https://forum.knime.com/u/swebb)\
**Post date:** [June 25, 2019, 5:05pm UTC](https://forum.knime.com/t/javafx-in-knime-4/15597/8 "2019-06-25T17:05:08Z")

</div>

Ah this wall cause me a major headache I have eclipse views and cell renders that depend on Javafx 😟

@s.roughley thanks for bringing this to my attention.

@qqilihq I’ll take a look at my internal builds against knime 4 tomorrow and see if I can find a workaround.

I have a docker image with openjdk8 and javafx working so there is some hope 🤞

---

<div class="post-metadata">

**Author:** ![swebb](https://forum-cdn.knime.com/user_avatar/forum.knime.com/swebb/32/369_2.png) [@swebb](https://forum.knime.com/u/swebb)\
**Post date:** [June 25, 2019, 10:08pm UTC](https://forum.knime.com/t/javafx-in-knime-4/15597/9 "2019-06-25T22:08:06Z")

</div>

> <https://github.com/AdoptOpenJDK/openjdk-build/issues/577>
>
> Hallo,
> currently JavaFX libraries are missing from the OpenJDK 8 Windows Distributions. Is there a plan to include JavaFX in the AdoptOpenJDK...

From a quick browse it looks like we may need to build openjfx8 and make an osgi bundle providing the windows, macos and Linux libraries. Both adopt openjdk8 and amazon corretto currently have open issues w.r.t to javafx.

Alternatively a user could swap out the bundled jre for one containing javafx (an older oracle distro or a jre11 with the openjfx libs) but that’s not really a viable solution.

I will investigate further tomorrow.

---

<div class="post-metadata">

**Author:** ![s.roughley](https://forum-cdn.knime.com/user_avatar/forum.knime.com/s.roughley/32/366_2.png) [@s.roughley](https://forum.knime.com/u/s.roughley)\
**Post date:** [June 26, 2019, 7:52am UTC](https://forum.knime.com/t/javafx-in-knime-4/15597/10 "2019-06-26T07:52:38Z")

</div>

I looked at that thread too - it looks like they are working back from v11 backwards, but they were aiming for end of Q1 this year for v8, which has obviously slipped significantly… Good luck!

---

<div class="post-metadata">

**Author:** ![qqilihq](https://forum-cdn.knime.com/user_avatar/forum.knime.com/qqilihq/32/50_2.png) [@qqilihq](https://forum.knime.com/u/qqilihq)\
**Post date:** [June 26, 2019, 8:00am UTC](https://forum.knime.com/t/javafx-in-knime-4/15597/11 "2019-06-26T08:00:17Z")

</div>

I found that same link. Here’s a solution for Java 8:

> **[Build OpenJFX 8 for AdoptOpenJDK - Benjamin Brummer](https://benjamin-brummer.de/2019/06/03/build-openjfx-8-for-adoptopenjdk/)**
>
> Latest builds can be found here Latest OpenJFX Builds Requirements Cygwin https://www.cygwin.com/setup-x86\_64.exe bison flex gcc-g++ gperf make makedepend mercurial openssh perl ruby unzip zip DirectX…

It involves a kitchen sink full of build requirements and patching files. And these instructions are only for Windows (so, someone would need to port this and make it work on Linux/macOS as well). And then, all of this would then need to be wrapped in OSGi plugins and fragments 🤯

In my case, the JavaFX dependency is in an additional plugin for the plugin, so I decided to rather strip this out to get a working 4.0 release with 99% of the functionality.

Anyways, I’d still be willing to contribute / cooperate as good as I can to find a common solution.

– Philipp

---

<div class="post-metadata">

**Author:** ![swebb](https://forum-cdn.knime.com/user_avatar/forum.knime.com/swebb/32/369_2.png) [@swebb](https://forum.knime.com/u/swebb)\
**Post date:** [June 26, 2019, 8:14am UTC](https://forum.knime.com/t/javafx-in-knime-4/15597/12 "2019-06-26T08:14:42Z")

</div>

@wiswedel do you think the java 11 update will happen for the next release?

It might be easier for my team internally to not update until either adoptopenjdk resolve the javafx issue or java 11 can be used.

If @qqilihq has a solution he’s happy with then I’m inclined not to go down the rabbit hole of making a javafx bundle and just wait it out.

---

<div class="post-metadata">

**Author:** ![swebb](https://forum-cdn.knime.com/user_avatar/forum.knime.com/swebb/32/369_2.png) [@swebb](https://forum.knime.com/u/swebb)\
**Post date:** [June 26, 2019, 11:51am UTC](https://forum.knime.com/t/javafx-in-knime-4/15597/13 "2019-06-26T11:51:59Z")

</div>

![image](https://forum-cdn.knime.com/uploads/default/original/2X/3/30bd52391c6aa6ada1818a57fa7416328cbbb453.png)

Is there a way here of making sure I’m using the bundled java distribution or do I need to download and configure the AdopteOpenJDK myself?

---

<div class="post-metadata">

**Author:** ![thor](https://forum-cdn.knime.com/user_avatar/forum.knime.com/thor/32/4_2.png) [@thor](https://forum.knime.com/u/thor)\
**Post date:** [June 26, 2019, 12:28pm UTC](https://forum.knime.com/t/javafx-in-knime-4/15597/14 "2019-06-26T12:28:33Z")

</div>

You have to point it to the JRE of an existing KNIME 4.x installation. The JRE is a feature and part of the update site but it cannot be used when starting from an SDK.

---

<div class="post-metadata">

**Author:** ![swebb](https://forum-cdn.knime.com/user_avatar/forum.knime.com/swebb/32/369_2.png) [@swebb](https://forum.knime.com/u/swebb)\
**Post date:** [June 26, 2019, 1:00pm UTC](https://forum.knime.com/t/javafx-in-knime-4/15597/15 "2019-06-26T13:00:40Z")

</div>

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![swebb](https://forum-cdn.knime.com/user_avatar/forum.knime.com/swebb/32/369_2.png) [@swebb](https://forum.knime.com/u/swebb)\
**Post date:** [January 6, 2020, 3:28pm UTC](https://forum.knime.com/t/javafx-in-knime-4/15597/16 "2020-01-06T15:28:46Z")

</div>

If anyone else stumbles into JavaFX issues in KNIME v4 a solution that appears to be working for me is to switch to use the Amazon Corretto JRE (or an older Oracle JRE) and updating the knime.ini to:

```
-vm
jre8/bin

```

My JavaFX Eclipse views, node dialogs and cell renders appear to be working as expected and I’ve not noticed any unexpected behaviour.

Hopefully this can be avoided when Java 11 or newer becomes the embedded JRE.

Cheers

Sam

---

<div class="post-metadata">

**Author:** ![swebb](https://forum-cdn.knime.com/user_avatar/forum.knime.com/swebb/32/369_2.png) [@swebb](https://forum.knime.com/u/swebb)\
**Post date:** [July 9, 2021, 2:55pm UTC](https://forum.knime.com/t/javafx-in-knime-4/15597/17 "2021-07-09T14:55:23Z")

</div>

To loop back into an old topic a bit. With the upgrade to Java 11 in KNIME 4.4 it seems to now be possible to add JavaFX as an OSGi dependency and I’ve been able to get my JavaFX integrations working without needing to bundle a custom JRE.

Instructions on adding JavaFX into the dev environment: [Add JavaFX controls to a SWT Eclipse 4 application – Eclipse RCP Cookbook UPDATE | vogella blog](http://blog.vogella.com/2019/11/15/add-javafx-controls-to-a-swt-eclipse-4-application-eclipse-rcp-cookbook-update/)

🤞 it works once installed into a production KNIME

---

<div class="post-metadata">

**Author:** ![gab1one](https://forum-cdn.knime.com/user_avatar/forum.knime.com/gab1one/32/461_2.png) [@gab1one](https://forum.knime.com/u/gab1one)\
**Post date:** [July 9, 2021, 3:15pm UTC](https://forum.knime.com/t/javafx-in-knime-4/15597/18 "2021-07-09T15:15:48Z")

</div>

Oh thats super cool 🙂

---

<div class="post-metadata">

**Author:** ![swebb](https://forum-cdn.knime.com/user_avatar/forum.knime.com/swebb/32/369_2.png) [@swebb](https://forum.knime.com/u/swebb)\
**Post date:** [July 15, 2021, 10:14am UTC](https://forum.knime.com/t/javafx-in-knime-4/15597/19 "2021-07-15T10:14:54Z")

</div>

> 🤞 it works once installed into a production KNIME

False alarm, the AdoptOpenJDK version of the JRE (and probably most others except Bellsoft and Azul) don’t have all the modules required for JavaFX.

> <https://github.com/adoptium/adoptium-support/issues/12>
>
> Both the OpenJ9 and the Hotspot 11.0.3\_7 \*\*JRE\*\* for 64bit Windows are missing t…he \`jdk.unsupported.desktop\` module.
> 
> This module is \_required by\_ the JavaFX 12 \`javafx.swing\` module.
> For more information see \[JDK-8202175\](https://bugs.openjdk.java.net/browse/JDK-8202175) and this \[openjdk-jfx issue\](https://github.com/javafxports/openjdk-jfx/issues/458).

So without changing the JRE or using jlink to make my own with the missing module looks like it won’t work.

---

<div class="post-metadata">

**Author:** ![qqilihq](https://forum-cdn.knime.com/user_avatar/forum.knime.com/qqilihq/32/50_2.png) [@qqilihq](https://forum.knime.com/u/qqilihq)\
**Post date:** [July 15, 2021, 9:15pm UTC](https://forum.knime.com/t/javafx-in-knime-4/15597/20 "2021-07-15T21:15:04Z")

</div>

Pity! But thanks for coming back and clarifying! 🙂

– Philipp

[Next page](https://forum.knime.com/t/javafx-in-knime-4/15597.md?page=2)
