Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Graphics2D problem

 
jenny wang
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I create an Image using JAVA Graphics2D API.
The code is running well in Windows. But I got the following error in UNIX server. It seems that it has trouble with X11 window. Anybody knows how to solve this problem?
Thanks in advance!
jenny
Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
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:59)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:58)
at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1011)
 
ryan headley
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think what this looks like is that X11 may not be setup properly or the DISPLAY variable is incorrect.
You usually get that message when an XServer is not running (I think, its been a while)
Is the X11 system even running on that box? Or are you running this from say a console?
 
jenny wang
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ryan:
Thanks for your respond. My servlet code is running in JRUN which is installed in a SUN Enterprise Server. I got error message when I try to see it in Internet Explorer in my computer(WindowNT).
I am not sure how to setup X11 in UNIX server. Can you tell me how to configure it or how to setup DISPLAY variable? I will really appreciate your help.
jenny
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic