Published on Sep 9 2011 in Java
Some versions of the Java.AWT library on Linux require a functioning Xserver. Setting -Djava.awt.headless=true is not helping in all cases.
Somtimes client can get the following error message:
Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
At JVM Host we don't run full X environment on shared servers, but this can be compensated with use of Xvfb
. Alternatively, this can be done with Xvnc
but it takes more resources and is a per user solution.
If you experienced this issue, please contact us and we will enable Xserver on your host. Additionally, enabling headless mode via our custom Java Control Panel JCP will make the following settings in your ~/.bashrc
:
export DISPLAY=:0
export JAVA_OPTS="-Djava.awt.headless=false"
You will need to restart the application server for the settings to take effect.