Meaningless Drivel is fun!*
The moose likes Swing / AWT / SWT and the fly likes Graphics2D problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Graphics2D problem" Watch "Graphics2D problem" New topic
Author

Graphics2D problem

jenny wang
Greenhorn

Joined: Feb 23, 2001
Posts: 27
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

Joined: Jun 28, 2000
Posts: 156
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?


Ryan Headley<br /><a href="http://www.sudovi.com" target="_blank" rel="nofollow">http://www.sudovi.com</a>
jenny wang
Greenhorn

Joined: Feb 23, 2001
Posts: 27
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Graphics2D problem