Discussion Locked

Run a headless Java server

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Tell us what you think about our tip on running a headless Java server.

4 replies

by Mark W. Kaelin

I have received some feedback from subscribers that suggests that the term "headless server" is not as widely known as I believed. I apologize.

Many environments, such as mainframe machines and dedicated servers, do not support a display, keyboard, or mouse. This is a headless server.

by bayard-generationjava

In terms of old systems, this is a true definition of
'headless', but in the Java on Unix environment,
'headless' has come to mean not having a graphical
context available. So any java.awt object cannot be
built.

Running a graphical context on a machine is a waste of
resource [Windows rant rant] and often is avoided. The
keyboard/mouse/display definition does not apply to
the concept of headless as defined by Sun in Java.

[To my knowledge]

by freddio

Headless environments *can* exist even on machines which support keyboards and monitors. For example, if you were to start a Tomcat engine via Telnet on Solaris or AIX (which may or may not have a "head"), there would NOT be a graphical context (i.e., XWindows session) and a headless approach is warranted. This also may apply to UNIX startup scripts which are typically run as root and not necessarily in a graphical context (X session).

Also, you did not mention a cleaner approach Xvfb (XWindows Virtual Frame Buffer). See below for details

http://www.xfree86.org/4.0.1/Xvfb.1.html

http://chartworks.com/support/server/XvfbonUnix.html

http://www.itworld.com/AppDev/1461/UIR000330xvfb/

by bayard-generationjava

Hey freddio.

While I've not used Xfvb, it would be a cleaner
approach if non-java applications also needed a fake
graphical context. It comes down to whether the
definition of cleaner involves installing a Java library
[clean to me] or messing around with X systems
[traditionally a pain].

As a Java developer, having to build Xvfb from source,
or installing an eTeks jar, the cleaner solution is clearly
the Java solution.

This discussion is closed to new replies.