LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Java access to Xhost on Gridengine (http://www.linuxquestions.org/questions/linux-server-73/java-access-to-xhost-on-gridengine-884365/)

markdibley 06-03-2011 12:32 PM

Java access to Xhost on Gridengine
 
Hi

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.

Code:

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(X11GraphicsEnvironment.java:53)
        at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:142)
        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:164)
        at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
        at HistogramGraph.plot(HistogramGraph.java:119)
        at HistogramGraph.main(HistogramGraph.java:69)

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.

Mark


All times are GMT -5. The time now is 12:14 PM.