JavaFX Java9 incompability


oracle decided to fuck us up once again, by implementing a good idea in a shitty way :slight_smile:

Essentially the JFX integration currently works by emulating a swing context and abusing the abilities the JavaFXPanel has. Now with java9 we can no longer see&load the related classes because reasons. no the questions is what can be done?

I thought so far (but not tried)
Use openjfx selfcompiled as a basis
Make a swing to JME bridge, let JFX run in a JFXPanel
Stay with Java8 forever/ hope jigsaw dies

All kinda suck, any other ideas?

Start a petition?


I personally like the idea of a swing to jme bridge. It will open up the use of swing within a JME application and still allow us to integrate our JFX code through a JFXPanel.

Do you offer using JavaFX → Swing → JME? :slight_smile:

I am using JME → JFX → Swing right now

It is terrible :open_mouth:

No actually it works very well. I use JFX for the menus and then the menus launch swing components.

You launch jme context, javaFX context and swing context. Also, swing works on the layer of javaFX. It is horrible. You have a lot of overheads for this.

1 Like

I agree the overhead is HUGE but this is the only way I can embed swing components into the JME application. I wish we had a JME to Swing bridge but we do not.

At this moment, does JME support java9? I just want to start porting JFX to java9.

If you apply BufferAllocator Round 2 by empirephoenix · Pull Request #533 · jMonkeyEngine/jmonkeyengine · GitHub yes.
(or for short test, just kill all reflection and dispose stuff in BufferUtils, till it is merged

thx :slight_smile:

The porting is in progress :slight_smile:


Implemented the render, key/mouse inputs…


Nice, this did actually run under java9? without any classnotfounds (cause that were my main problems)?
How is the performance with all the reflection stuff compared to the one before? Noticeable worse, or around equal?

(Since I’m on a ingame ui trip currently, jfx is not that much use to it, but I still have ton’s of ui that I would like to keep, also alone the working webbrowser is a huge argument for javafx)

How is this in the terms of api compability with the former code? couls this be a dropin replacement, or is it necessary to rewrite some parts?

I tested it on JDK9 128 build, I use a method/var handle, it is not the reflection…

1 Like

Also my version works only with LWJGL3 :slight_smile:

Have updated my branch, I have fixed some bugs with mouse events and color format.
Also, example of usage:

Also, I’m going to implement working with DnD.

I have some problem with your ReflectionAllocator on JDK9, but I have no any problems with JavaFX on the same JDK9.