How Gluon Substrate, Liberica NIK, and StaticFX get JavaFX running as a GraalVM Native Image, including WebView and media, benchmarked on a Raspberry Pi 5.

55 points•0x54MUR41•11 days ago•13 comments•

13 comments

exabrial8 days ago
One thing I think that's needed with JavaFX is integrations with DI frameworks! I started a project called DiFx that does exactly that: https://github.com/exabrial/DiFx

This makes state and shared data management in JavaFX much nicer, as you offload those concerns to a container. CDI also provides extensive capabilities with portable extensions and scope management, as well as a sync and async eventing framework.

The problem is that I don't have a "real life" project to try this out on, so development kinda slumped off.

geokon9 days ago
Thanks for writing this up! It still assumes a lot of prior knowledge, but it's a good starting point to approaching these problems. How JavaFX works on different platforms really looks like dark magic from the outside. I wrote an app in Clojure using cljfx. I can jpackage it and run it Linux/Windows/macOS .. it's quite easy to get working. But once you step outside of the standard platforms it gets complicated really fast. Trying to get it to Android or a native build and suddenly you have to be an expert in several build systems and JVM internals.
giancarlostoro9 days ago
Apparently JavaFX didnt die as we all thought back when Oracle spit it out of the JDK, they will happily offer support for it now, but who wants to be in bed with Oracle.

That looks really sleek. One thing JavaFX got right was CSS support.

exabrial8 days ago
I don't think this is an accurate assessment. Oracle has its flaws and closet full of dead bodies/skeletons, but they've been good stewards of the JDK and JavaFX overall. Gluon and Oracle have done tremendous amount of work with JavaFX.

Splitting it off the JDK was definitely the correct call. It's a Desktop UI framework, it should not be bound to JDK releases.

pjmlp8 days ago
Everyone that uses Java, because Oracle is responsible for about 70% of development efforts.

https://insights.linuxfoundation.org/project/openjdk-jdk/con...

_benj9 days ago
You see JavaFX everywhere in finance software. I learned it from working on finance.
jfyi8 days ago
Their move from javafxports to graalvm left me dead in the water for android hardware support. Nobody was going to replace the hardware we were running on any time soon, so had to ditch them.

That was forever ago, maybe it improved.

geokon9 days ago
JavaFX is supported by Gluon and not Oracle
pron9 days ago

Read the full thread on Hacker News →

Related stories