This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Hi, Am facing the following problem, when I try to run the awt program that displays a lamp in a frame, the same program works fine in any windows machine, problem is:
Xlib: connection to ":0.0" refused by server Xlib: Client is not authorized to connect to Server Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using ':0' as the value of the DISPLAY variable. at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:58) 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.Window.<init>(Window.java:186) at java.awt.Frame.<init>(Frame.java:315) at java.awt.Frame.<init>(Frame.java:262) at LampUI.<init>(LampUI.java:139) at LampUI.main(LampUI.java:397)
May I know what could be the problem and how to solve it?
Any help in this regard is appreciable, Thanks in advance, With regards, Santosh
you have to own the display to start a java program that opens a graphic interface. are you starting the program on the unix machine itself or over the network? if the latter, than you have to reset the display environment on the unix machine to point to the machine you are currently working on. chantal