-
CSR
-
Resolution: Approved
-
P4
-
None
-
behavioral
-
minimal
-
The worst that can happen is that apps run instead of failing with a cryptic error message.
-
Other
-
JDK
Summary
Automatically assume AWT headless mode if only headless AWT headless libraries are installed on Linux
Problem
AWT on Linux provides two native libraries, one for "headful" X11 desktop apps, and one for "headless" server apps. In some package install configurations, only the headless one may be available and installed, but if the DISPLAY variable is set, and 2D/Swing/AWT APIs are invoked, AWT will still assume it should use the "headful" library, leading to a RuntimeException and the AWT failing to start even if the application did not call any APIs that require a headful library.
Solution
Just as we have done for a long time if DISPLAY is not set, then similarly assume headless mode. Apps which only need headless mode will then run as expected, apps which required headful will get a more helpful error message.
Specification
There is no specification - this is a behavioural change as described above.
- csr of
-
JDK-8286447 [Linux] AWT should start in Headless mode if headful AWT library not installed
- Resolved