This is because the call to the graphically environment is probably using
an awt component that is peered with a native X-Windows implementation.
This component is probably making a call to the X server for some service
(for example rendering a font). That call will be done in the context
of whoever started the jvm and will try to make connection to an X
server based on the runtime environment of the jvm process. A work around
to this is to set the DISPLAY variable to an X server running on the machine
that the jvm is runing and that allows access for the person that invoked
the jvm. This is not a good thing because if someone kills the server,
your code will stop working again.
A better solution would be to point to some non-graphical X server
instance or better yet to use a graphical toolkit that avoids awt.
>
> Hi all,
>
> i am running a servlet on a suse 7.0 -server, running with
> blackdown jdk
> 1.2.2. This servlet shall create on the fly a gif-image and store that
> somewhere on the server.
>
> When the module of the servlet is reaching the point, where
> it shall call
> the graphic-environment, the following error occurs:
>
> java.lang.InternalError:
> Can't connect to X11 window server using ':0.0' as the
> value of the DISPLAY
> variable.
>
> Since yesterday i am reading everything about xwindows,
> DISPLAY-variable eg
> in the net and in some books but don't come to a real
> success. Can anybody
> help me?
>
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]