You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@gump.apache.org by "Adam R. B. Jack" <aj...@trysybase.com> on 2003/10/15 00:16:11 UTC

Issue: Can't connect to X11

http://gump.dotnot.org/xml-xerces2/build/build_xml-xerces2_dist-xerces.html

java] Exception in thread "main" java.lang.InternalError: Can't connect to
X11 window server using ':0.0' as the value of the DISPLAY variable.
     [java] 	at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
     [java] 	at
sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:125)
     [java] 	at java.lang.Class.forName0(Native Method)
     [java] 	at java.lang.Class.forName(Class.java:140)
     [java] 	at
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment
.java:62)
     [java] 	at
java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1041)
     [java] 	at org.apache.stylebook.printers.ImagePrinter.print(Unknown
Source)
     [java] 	at org.apache.stylebook.BasicEntry.create(Unknown Source)
     [java] 	at org.apache.stylebook.Project.create(Unknown Source)
     [java] 	at org.apache.stylebook.StyleBook.main(Unknown Source)

Ought I consider adding:


    forrest.addPrefixedParameter('-D','java.awt.headless','true','=')


.. to all Ant/Script invokes, not just forrest?

Ought I do this in code, or in the workspace, or expect the user to handle
it [somehow]?

regards

Adam
--
Experience Sybase Technology...
http://www.try.sybase.com


Re: Issue: Can't connect to X11

Posted by Stefan Bodewig <bo...@apache.org>.
On Tue, 14 Oct 2003, Adam R. B. Jack <aj...@trysybase.com> wrote:
> http://gump.dotnot.org/xml-xerces2/build/build_xml-xerces2_dist-xerces.html
> 
> java] Exception in thread "main" java.lang.InternalError: Can't
> connect to X11 window server using ':0.0' as the value of the
> DISPLAY variable.

Happens on gump.covalent.net as well (I run Xvfb on my machine for
just that reason).

> Ought I consider adding:
>
>     forrest.addPrefixedParameter('-D','java.awt.headless','true','=')
> 
> .. to all Ant/Script invokes, not just forrest?

If that actually helps.  I've never tried it and have no idea how
portable it is, but it probably won't hurt either.

> Ought I do this in code, or in the workspace, or expect the user to
> handle it [somehow]?

Try it in your workspace with

<property name="java.awt.headless" value="true"/>

the same way as build.sysclasspath is handled.  We'll see whether it
really fixes something.

Stefan