Thanks, Ugo. I was not aware that you could specify a headless
environment that way.
I think this is the right way to go, because ultimately, I want to
using VisAD within a servlet, and servlets are headless.
I added -Djava.awt.headless=true to the invocation of the java VM
when I ran my test program.
I now get a InitializerException thrown from DisplayImplJ3D.initialize()
VisADConfig.makeConfig calls getDefaultScreenDevice() which throws
I'm thinking that:
(a) if I'm creating an offscreen DisplayImplJ3D, it should not be
asking for a default screen device.
or (b) DisplayImplJ3D.initialize() should gracefully handle a headless case.
Ugo Taddei wrote:
I'm not sure if this will help, but here we go:
The java.awt.headless property (since JDK 1.4.2) can perhaps be used.
Q: "...I find that when I run my application on Solaris or Linux it
needs an Xserver.(...)"
A: "There are two possible solutions. For releases prior to 1.4 you
can provide a "pseudo X-server" to emulate a display environment One
of these X-server emulators is Xvfb, available for download at www.x.org.
The preferred solution for release 1.4 and later is to use the new
headless AWT toolkit
This new feature allows you to use the J2SE API in a server-side Java
application without requiring you to have a GUI environment.
To specify the headless environment when using Sun Microsystem's
reference implementation, run your application with this property:
Never did this with VisAD, but it might work. Well, it's a nice thing
to know anyway.
Valliappa Lakshmanan wrote:
If I create a JFrame and make it visible, then the off-screen
render works, i.e. if I add these two lines before the getImage(true)
then, the program runs to completion.
Does VisAD *require* a visible component
in order to do an off-screen render?