For safe headless operation of Java application servers I use two options:
- unset DISPLAY
The first option, "-Djava.awt.headless=true" is a Java system property. It is relatively well-known.
The shell command "unset DISPLAY" is not very well known. It removes any references to remote X11 displays, including ones that have been forwarded over ssh connections. This solves issues where application servers stop working as soon as you log off. :-)
Hope this helps.
In the past, what problems (and solutions) did you have with headless operation?