File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
Author

How to connect to X11 server

Mohan Reddy
Greenhorn

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: 16305
    
  21

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:

http://java.sun.com/j2se/1.4.2/docs/guide/awt/AWTChanges.html#headless
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to connect to X11 server