Java-Monitor Forum > Forum > Java Administration » Headless Operation
Thread Tools Search this Thread Display Modes
Old 15-07-2008, 20:22
admin admin is offline
Join Date: Jul 2008
Posts: 229
Default Headless Operation

For safe headless operation of Java application servers I use two options:
  • -Djava.awt.headless=true
  • 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?

Kees Jan
Reply With Quote
Old 23-07-2008, 20:23
Tobias Tobias is offline
Junior Member
Join Date: Jul 2008
Posts: 6

I wonder why the JDK does not automatically fallback to headless is there is no window system available. How is throwing an exception better?
Reply With Quote
Old 23-07-2008, 20:57
kjkoster kjkoster is offline
Forum Operator
Join Date: Jul 2008
Posts: 1,195

Just thinking out-loud here: perhaps it is because graphics tend to be display-dependent in things as colour maps and colour depth. Perhaps throwing the exception makes more sense than making assumptions (to the JDK devs ).
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump