Hi Eric,
the awt code always tries to connect to an X server. If the machine your
program is running on has an X server running but you cant't connect
it's because as a telnet user you don't own the console and therefore
are not allowed to connect (it may be that you want to supervise other
user's work, which is normally not desired). The solution reported to
work on this list several times even if there is no X server at all is
to use the virtual frame buffer X server. This is a program that acts
like an X server to its clients, but has no real display. The name of
the program is xvfb, if I recall correctely.
Matthias
Eric SCHAEFFER wrote:
>
> Hi,
>
> I've got an error when I try to run my code (it create an image using
> Java2D) from telnet (by example), but not when I run it from X :
>
> Exception in thread "main" java.lang.InternalError: Can't connect to X11
> window server using ':0.0' as the value of the DISPLAY variable.
> at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
> at
> sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:61)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Compiled Code)
> at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(Compiled
> Code)
> at java.awt.image.BufferedImage.createGraphics(Compiled Code)
> at BaroChart.AbstractBaroChart.<init>(Compiled Code)
> at BaroChart.PieChart.<init>(Compiled Code)
> at BaroChart.BaroChartFactory.Make(Compiled Code)
> at test_pie.main(Compiled Code)
>
> It's important for me because I want to produce images (charts) in batch
> mode and from my Web site (witch isn't connected to an X server...).
>
> I use Linux Debian 2.1 / blackdown JDK 1.2.0 (gclib 2.0).
>
> Do I need to configure X in a special way to do this ?
>
> Thank's
> Eric.
> _______________________________________
>
> Eric SCHAEFFER
> [EMAIL PROTECTED]
>
> POSTER CONSEIL
> 118 rue de Tocqueville
> 75017 PARIS
> FRANCE
> Tel. : 33-140541058
> Fax : 33-140541059
> _______________________________________
>
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]