Yet it's exactly what's happening now: the system changes from headful to headless… and back to headful.

On 2026-03-30 21:05, Philip Race wrote:
Also making it a bit of a tricky one in that "headless" isn't designed to be something that changes during the life of the application.

Before https://bugs.openjdk.org/browse/JDK-8185862, it was assumed a display always exists. However, it wasn't always the case, and it caused the assertion in AWT.

The assertion may have appeared after a while, too. To silence the assertion, the code in JDK-8185862 detects whether there are monitors connected to the system. If there are none, it switches to headless mode.

As the subsequent bug reports show, the state can change while a Java application is running: the connected monitors could disappear when a (user) session is disconnected; monitors could then reappear when a session gets connected again.

I still wonder why this behaviour isn't reproducible all the time, though…

--
Regards,
Alexey

Reply via email to