java
Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 15-07-2008, 20:22
admin admin is offline
Administrator
 
Join Date: Jul 2008
Posts: 209
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
  #2  
Old 23-07-2008, 20:23
Tobias Tobias is offline
Junior Member
 
Join Date: Jul 2008
Posts: 6
Default

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
  #3  
Old 23-07-2008, 20:57
kjkoster kjkoster is offline
Forum Operator
 
Join Date: Jul 2008
Posts: 1,126
Default

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
Reply

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