Is it possible to create minimal 'software-only' architecture implementation of JavaFX using Java2D/AWT?
Kevin Rushforth
kevin.rushforth at oracle.com
Fri Jan 23 21:56:45 UTC 2026
No, this isn't possible. Many of the pieces are there to do something
along these lines, but even our software renderer uses native code.
A combination of the experimental headless glass toolkit, the software
pipeline, and JFXPanel might get you most of the way there, but it would
take a fair bit of effort to get it to the point where it was usable
without any native code. And if you wanted an ordinary JavaFX
Application (as opposed to a JFXPanel embedded in a Swing app) to run it
would be even more work.
Long ago (before JDK 7) the predecessor to Glass and the Prism rendering
pipeline had an AWT-based implementation of the Windowing toolkit and a
Java2D-based renderer, but those are long gone (except for the "j2d"
renderer, which morphed into a printing pipeline).
I doubt this is a direction we would be interested in exploring again.
-- Kevin
On 1/23/2026 11:58 AM, Jeff Martin wrote:
> I wonder, is the architecture independent part of JavaFX written in
> 100% Java? If so, would it be possible to write a minimal architecture
> implementation using Java2D/AWT, so many JavaFX apps could run with
> just the standard JVM?
>
> I see the repo stats say that ~73% of JavaFX is written in C/C++, and
> obviously Java2D wouldn’t help with the 3D features or WebView, but a
> “software only” JavaFX version could be interesting and let many
> JavaFX apps run in the browser with CheerpJ.
>
> jeff
>
> PS - I did ask AI, but it’s unclear to me whether the architecture
> independent code drops into C before it uses platform dependent code.
> I’m guessing that it does.
>
> https://chatgpt.com/share/6973d226-513c-8013-bcc1-0b70ec07a465
>
More information about the openjfx-discuss
mailing list