File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes rgdg awt on Linux {java.lang.InternalError} Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "rgdg awt on Linux {java.lang.InternalError}" Watch "rgdg awt on Linux {java.lang.InternalError}" New topic

rgdg awt on Linux {java.lang.InternalError}

san jan

Joined: Sep 26, 2000
Posts: 24
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>(
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(
at java.awt.Window.<init>(
at java.awt.Frame.<init>(
at java.awt.Frame.<init>(
at LampUI.<init>(
at LampUI.main(

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,
Chantal Ackermann
Ranch Hand

Joined: Sep 28, 2000
Posts: 508
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.
I agree. Here's the link:
subject: rgdg awt on Linux {java.lang.InternalError}
It's not a secret anymore!