🚀 Introducing the Headless Platform for JavaFX   Recently updated !


We’re excited to announce a new addition to the JavaFX ecosystem: the Headless Platform, a lightweight, platform-independent backend that enables running JavaFX applications without a graphical user interface.

Why a Headless Platform?

JavaFX has long relied on platform-specific glass implementations (like mac, win, and gtk) for rendering user interfaces. While that works great for traditional desktop apps, there are scenarios, especially around testing or automation, where rendering a UI is unnecessary or even undesirable.

That’s where the new Headless Platform come in.

What is the Headless Platform?

The Headless Platform is a new glass platform implementation that:

  • Requires no native UI toolkit (no macOS, Windows, or GTK dependencies)
  • Does not render a user interface
  • Is ideal for tests, automation, and non-visual applications
  • Runs on any OS, with no window manager needed

It’s a clean, minimal backend focused purely on functional execution of JavaFX logic, without the overhead of rendering.

How Is It Different from Monocle?

Some of you might be familiar with Monocle, a platform we’ve supported in JavaFX for embedded and headless scenarios. While Monocle includes a headless mode, it also includes many other targets, including support for platforms like Android and i.MX and bundles native code as part of those implementations.

Because of this added complexity and its platform-specific nature, Monocle was not bundled by default with JavaFX. It required additional setup and wasn’t always straightforward to use in standard desktop or testing environments.

By contrast, the new Headless Platform is:

  • Pure Java, with no native dependencies
  • Simpler and easier to use
  • Specifically designed for headless use cases
  • Bundled directly in the javafx.graphics module, making it available to anyone using standard JavaFX downloads

That means no extra configuration, builds, or native libraries are needed – it’s just there, ready to use.

Use Cases

Here are just a few scenarios where the Headless Platform shines:

  • 🔍 Unit Testing: Run tests that involve JavaFX components without needing a display
  • ⚙️ Continuous Integration: Run JavaFX tests in CI/CD pipelines without configuring virtual displays
  • 🤖 Background Processing: Use JavaFX APIs (like animations or timelines) in non-visual contexts
  • 📦 Tooling and Frameworks: Build frameworks or tools that leverage JavaFX under the hood, without needing a UI

Getting Started

To use the Headless Platform, simply select it as the glass platform when launching your JavaFX application. We’ll be sharing full instructions and documentation shortly but in most cases, it’s as simple as setting a system property:


-Dglass.platform=Headless

That’s it. No extra setup, no display required.

What’s Next?

We believe this new headless platform opens up a wide range of possibilities for developers using JavaFX, especially in testing and automation contexts. It’s one more step in making JavaFX a versatile, modern toolkit for a wide variety of use cases.

This new feature will be officially available starting with JavaFX 26, scheduled for release in March 2026. An early-access (EA) version is already available for download from our website (select JavaFX version 26-ea+2 [Early access]), so you can try it out today.

We welcome your feedback and suggestions, and plan to backport the feature to previous long-term support (LTS) releases once available in 26.

For teams that rely on stability and long-term maintainability, Gluon’s commercial Long-Term Support (LTS) offering provides continued updates, security patches, and critical fixes for selected JavaFX versions. This allows you to build and ship with confidence, knowing your applications will remain secure and supported over time.

Thank you for being part of the JavaFX community. We’re proud to support your work and look forward to what you’ll build next.