Integrated: 8357675: Amend headless message
Alexey Ivanov
aivanov at openjdk.org
Fri May 30 13:35:02 UTC 2025
On Mon, 26 May 2025 16:38:21 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
> Currently, the default headless message ends with a comma instead of full stop and has an additional line break.
>
>
> Exception in thread "AWT-EventQueue-0" java.awt.HeadlessException:
> No X11 DISPLAY variable was set,
> or no headful library support was found,
> but this program performed an operation which requires it,
>
> at java.desktop/java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:158)
> at java.desktop/java.awt.Window.<init>(Window.java:518)
> at java.desktop/java.awt.Frame.<init>(Frame.java:428)
> at java.desktop/javax.swing.JFrame.<init>(JFrame.java:224)
>
>
> **Fix:**
>
> Amend the message so that it ends with a full stop and remove the line break.
>
>
> Exception in thread "AWT-EventQueue-0" java.awt.HeadlessException:
> No X11 DISPLAY variable was set,
> or no headful library support was found,
> but this program performed an operation which requires it.
> at java.desktop/java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:158)
> at java.desktop/java.awt.Window.<init>(Window.java:518)
> at java.desktop/java.awt.Frame.<init>(Frame.java:428)
> at java.desktop/javax.swing.JFrame.<init>(JFrame.java:224)
>
>
> **Testing:**
>
> Build a headless-only JDK (pass `--enable-headless-only` to the `configure` script) and create a `JFrame`.
>
> It's impossible to create an automated test for this change, and I don't think a test is required, it's a cosmetic change.
This pull request has now been integrated.
Changeset: 12ee80ca
Author: Alexey Ivanov <aivanov at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/12ee80cac754c1a6dd37191a9f80c01de8b659ad
Stats: 3 lines in 1 file changed: 0 ins; 1 del; 2 mod
8357675: Amend headless message
Reviewed-by: prr, shade
-------------
PR: https://git.openjdk.org/jdk/pull/25453
More information about the client-libs-dev
mailing list