J.Pietschmann wrote:

> Victor Mote wrote:
> > Is it safe to assume that all *n*x
> > platforms have or could get an X environment?
> No. This is a FAQ. It seems to be quite common for servers to come
> without X libraries installed, search the FOP, Cocoon and Batik lists for
> "headless server".

OK, here is a related question that does not appear to be an FAQ (per my
review of FOP, Batik, and Cocoon lists). If I try:
    ge = GraphicsEnvironment.getLocalGraphicsEnvironment();

in a headless environment, I get a runtime error that halts the JVM. There
does not seem to be a way to catch the error and skip the offending code
(which is all I really need to do). It looks like 1.4 will throw a
HeadlessException, and also gives a GraphicsEnvironment.isHeadless() method,
both of which are helpful. However, in 1.3, I don't see a clean way to
detect this -- I could probably do something klunky like looking at the
$TERM variable & trying to figure it out from there. We could conceivably
use a configuration entry or environment variable to flag this (with
"headless" defaulting to "yes" -- in other words, they would have to
override it with "no" for us to know that they are in a graphical
environment). I don't mind doing that, but I don't want to create a bunch of
support headaches. Any suggestions? On a related note, what are our criteria
for determining support of various Java platforms? In other words, at what
point would we insist on 1.4 as the minimum platform supported by FOP? I'm
not suggesting that we should do that, but just thinking through the costs &
benefits of an interim solution.

Victor Mote


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to