Web Development

General discussion


Run a headless Java server

By Mark W. Kaelin Editor ·
Tell us what you think about our tip on running a headless Java server.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

Definition of "headless server"

by Mark W. Kaelin Editor In reply to Run a headless Java serve ...

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.

Collapse -

headless definition

by bayard In reply to Definition of "headless s ...

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

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]

Collapse -

Further Clarif. & Alternate Solution

by freddio In reply to Run a headless Java serve ...

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




Collapse -


by bayard In reply to Further Clarif. & Alterna ...

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.

Related Discussions

Related Forums