-   Linux - Server (
-   -   Java access to Xhost on Gridengine (

markdibley 06-03-2011 12:32 PM

Java access to Xhost on Gridengine

I want to submit a job to my own Gridengine cluster that runs a perl script which does various things including forking to run a small java program which, amongst other things, draws graphs to a png.

Everything works fine until the java tries to output the png. Then I get the following error message.


Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using 'localhost:10.0' as the value of the DISPLAY variable.
        at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
        at sun.awt.X11GraphicsEnvironment.access$000(
        at sun.awt.X11GraphicsEnvironment$
        at Method)
        at sun.awt.X11GraphicsEnvironment.<clinit>(
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(
        at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(
        at HistogramGraph.plot(
        at HistogramGraph.main(

I have tried setting DISPLAY to various values with no success. I understand that qsub does not submit to an interactive queue, but the java is headless - all it needs is to access the X11 terminal, I presume, to access the graphic variables/libraries.

Am I missing some libraries or settings?

Is it possible to access the X term using qsub? If not what is the solution?

BTW - the code works fine if not queued on Gridengine.

Thanks for any help or advice.


All times are GMT -5. The time now is 05:03 AM.