aspose file tools
The moose likes Linux / UNIX and the fly likes How to connect to X11 server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "How to connect to X11 server" Watch "How to connect to X11 server" New topic

How to connect to X11 server

Mohan Reddy

Joined: Feb 10, 2006
Posts: 21
Hi friends,

Im using WebLogic 8.1 special Edition in Unix plaform.
In my project, there is a need to create charts using jfreechart jar file.
While creating the charts, it is giving exception like

cannot connect to X11 server using 0.0.

I tried setting DISPLAY variable with X11 server. After setting the DISPLAY variable, i have given the command xhost + to make the DISPLAY variable global.

Immediately its giving exception like

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

Please log me out from this ISSUE.

Thanks in advance.

cheers<br /> <br />mohan.<br /> <br /><br />Always do what you are afraid to do...
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16537

There are 2 ways to handle this. One is to include a special headless X server and the other is to start Java with the headless option. Headless Java became available somewhere around the 1.4 release.

For WebLogic, your best bet is to check BEA's docs. They should have something on how to run headless.

Customer surveys are for companies who didn't pay proper attention to begin with.
Roseanne Zhang
Ranch Hand

Joined: Nov 14, 2000
Posts: 1953
read here:
I agree. Here's the link:
subject: How to connect to X11 server