Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Executing java in Perl script

Status
Not open for further replies.

zeevam

Programmer
Feb 27, 2002
11
US
I am having problems getting a java window to come up from a Perl script. When I open an x-window I am able to execute to java command and the window shows up, but when I try and execute the java command in the perl script I get the following error:
Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.

Is there a way to pass the display variable in the perl script so that the java window will display on the user's PC.

Thanks,
Marc
 
Sorry, I'm unfamiliar with Java. I'm not sure how you are invoking java. If it is something that you call by dropping back out to the shell or forking and you can pass the display variable as an argument then it can be done. If its an internal window handle that is based on the current window you are working from I'm sure its possible but I'm unfamiliar with X11 API.
 
I am invoking the java command in a perl script. So:

my $command = "java MyClass";
sysyem $command;

I am unfamiliar with the DISPLAY command. I am not sure what I need to pass into the display. Would it be the IP of the server or the IP of the user's PC?

Thanks....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top