RFR: 8324941: POC for Headless platform for JavaFX [v12]
Johan Vos
jvos at openjdk.org
Mon Jul 28 11:28:25 UTC 2025
> After spending a year in the sandbox repository, the Headless Platform is now ready to be reviewed in the main repository.
>
> ### the Headless Platform
> The Headless Platform is a top-level com.sun.glass.ui platform that replaces the second-level Monocle-Headless subplatform, that is part of the top-level Monocle platform.
> The platform can be used like any other platform, especially for running headless JavaFX applications, or for running tests (e.g. on CI systems)
>
> ### changes
> The code for the Headless Platform is in a new package com.sun.glass.ui.headless in the javafx.graphics module, and it does not require a code change in other packages.
> This PR adds a simple change in the `build.gradle` file, to make the Headless Platform the standard when running headless tests (instead of using Monocle/Headless)
>
> ### enable the Headless Platform
> Setting the system property `glass.platform` to `Headless` will select the Headless Platform instead of the default one (either gtk, mac or win).
>
> ### testing
> `gradlew --info -PHEADLESS_TEST=true -PFULL_TEST=true :systemTests:cleanTest :systemTests:test`
> runs all the system tests, apart from the robot tests. There are 2 failing tests, but there are valid reasons for those to fail.
>
> ### robot tests
> Most of the robot tests are working on headless as well. add `-PUSE_ROBOT` to test those.
Johan Vos has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 13 additional commits since the last revision:
- Merge branch 'master' into 8324941-headless
- Add copyright sections
- Do not use System.getProperty() for getting configuration options for now.
Especially, don't use properties prefixed for GTK.
- Specify A as a double.
- Do not invoke notifyMouse twice
- Process more reviewer comments
- More reviewer processing
- Process reviewer comments
Remove unused code
- Process reviewer comments
- Update modules/javafx.graphics/src/main/java/com/sun/glass/ui/headless/HeadlessRobot.java
use switch expressions
Co-authored-by: mstr2 <43553916+mstr2 at users.noreply.github.com>
- ... and 3 more: https://git.openjdk.org/jfx/compare/7521fac0...7adac9f1
-------------
Changes:
- all: https://git.openjdk.org/jfx/pull/1836/files
- new: https://git.openjdk.org/jfx/pull/1836/files/46bb2072..7adac9f1
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jfx&pr=1836&range=11
- incr: https://webrevs.openjdk.org/?repo=jfx&pr=1836&range=10-11
Stats: 9682 lines in 150 files changed: 7528 ins; 1645 del; 509 mod
Patch: https://git.openjdk.org/jfx/pull/1836.diff
Fetch: git fetch https://git.openjdk.org/jfx.git pull/1836/head:pull/1836
PR: https://git.openjdk.org/jfx/pull/1836
More information about the openjfx-dev
mailing list