Java Can’t connect to X11 window server using ‘localhost:10.0’ as the value of the DISPLAY variable December 22, 2022 by Tarik You need to specify the -Djava.awt.headless=true parameter at startup time.