How to Fix the No X11 Display Error With Java Applications on Ubuntu 24.04 LTS
On my newly upgraded Ubuntu 24.04 LTS I got this error when I started a Java application:
Exception in thread "main" 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/sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice(HeadlessGraphicsEnvironment.java:58) at foo.lj.a(Unknown Source) at foo.lj.(Unknown Source)
