Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BSD Java 6 Preview Release 2




On Nov 23, 2007, at 4:19 AM, Valerio Schiavoni wrote:

I suppose this is normal (given the current todo list):

Exception in thread "main" 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.access $100(X11GraphicsEnvironment.java:52)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java: 155)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java: 131)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at java .awt .GraphicsEnvironment .getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
at java.awt.Window.init(Window.java:354)
at java.awt.Window.<init>(Window.java:407)
at java.awt.Frame.<init>(Frame.java:402)
at java.awt.Frame.<init>(Frame.java:367)
at org.jgroups.demos.Topology.<init>(Topology.java:42)
at org.jgroups.demos.Topology.main(Topology.java:223)


X11 is running, tiger.

Are you sure DISPLAY is set? If not, try setting it to ":0.0" or "localhost:0.0"


AWT's X11 initDisplay calls XOpenDisplay(NULL), which falls back on the DISPLAY environmental variable.
If DISPLAY is NULL, the error reporting code (responsible for printing the "Can't connect to ..." message) prints ":0.0", even though that's not true.


Relevant pieces of the code:

dpy = awt_display = XOpenDisplay(NULL);
if (!dpy) {
jio_snprintf(errmsg,
sizeof(errmsg),
"Can't connect to X11 window server using '%s' as the value of the DISPLAY variable.",
(getenv("DISPLAY") == NULL) ? ":0.0" : getenv("DISPLAY"));
JNU_ThrowInternalError(env, errmsg);
return NULL;
}


On Leopard, I believe XOpenDisplay(NULL) launches X11 and Just Works.

-landonf
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: Open Source Java 6 Developer Preview Release (From: Doug Zwick <email@hidden>)
 >Re: Open Source Java 6 Developer Preview Release (From: "Calum Shaw-Mackay" <email@hidden>)
 >BSD Java 6 Preview Release 2 (From: Landon Fuller <email@hidden>)
 >Re: BSD Java 6 Preview Release 2 (From: "Valerio Schiavoni" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.