This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
 
jQuery in Action, 2nd edition
 
subject: Graphics2D problem
 
Similar Threads
need graphics server to register?
java Graphics2D problem
XWindows error
how to use x11 to run the window java program?
how to run an application in unix and display in windows