You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jonathan Manning <bm...@bmb.leeds.ac.uk> on 2004/07/07 01:33:00 UTC

Re: [users@httpd] Calls to a Java program from a CGI script (via Apache)

Ahh thanks a lot- I'm using 1.4.2 I think, and that works great! Problem
solved!

Jon

On Wed, 2004-07-07 at 00:25, Robert F. Hall wrote:
> Jon,
> 
> You didn't mention which version of Java you are using, but provided 
> it's 1.4.1 or
> newer you can get around this problem by adding 
> "-Djava.awt.headless=true" to
> your java command.  Much better than messing with xvfb.
> 
> HTH,
> Robert
> 
> Jonathan Manning wrote:
> 
> >Hello to all,
> >
> >I'm attempting to run a Java program via a Perl CGI script system call.
> >While I've got the script running fine from the command line; I have
> >problems running from apache, the following message appearing in the
> >Apache error log: 
> >
> >java.lang.InternalError: Can't connect to X11 window server using 
> >':0.0' as the value of the DISPLAY variable 
> >
> >I've attempted setting the environment variable from the script prior to
> >the call to the java program like: 
> >
> >system ("export DISPLAY=<my IP>:0.0");
> >
> >and similar solutions like:
> >
> >system ("xhost +localhost");
> >system ("export DISPLAY=localhost"); 
> >
> >With no success. From lots of googling it seems that installing xvfb
> >might or might not help- is that a good idea? 
> >
> >I'm working with Fedora Core 1 and Apache 2.0. 
> >
> >Any help appreciated! 
> >
> >Thanks, 
> >
> >Jon 
> >
> >
> >---------------------------------------------------------------------
> >The official User-To-User support forum of the Apache HTTP Server Project.
> >See <URL:http://httpd.apache.org/userslist.html> for more info.
> >To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> >For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
> >  
> >
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org