Forum Moderators: coopster & phranque

Message Too Old, No Replies

invoked by perl script, Child window not closing

         

houh

8:05 pm on Jan 22, 2008 (gmt 0)

10+ Year Member



Hi

I have a perl script that fires a java application using the system command.

my $sys_call = join (' ', $java_home, $metrics_gui);
$sys_call = join ('',$sys_call, ' "', $mgconfig, '"');

# commands to run the MG GUI with $mgconfig as an input
system ($sys_call);

The java application generates openoffice documents which is run on the same box. However, I cannot close the openoffice document alone. Unless I kill the java app, the open office document does not close. I tried to use exec and tilda (``) command to fire the java app from the perl script but still same result.

Please let me know what you think

Houh

phranque

2:24 am on Jan 23, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



welcome to WebmasterWorld [webmasterworld.com], houh!

if i understood correctly, the problem is in your java app, since that is the process that has opened the document window.

houh

2:32 pm on Jan 23, 2008 (gmt 0)

10+ Year Member



Tx for repying.
Actualy it is not, since if I run the java app outside the perl script, I can close the openoffice doc that the java app generates fine.

Houh

houh

6:22 pm on Jan 25, 2008 (gmt 0)

10+ Year Member



Need to add when I run the java app from the shell scripts as:

export JAVA_HOME=/opt/corp/projects/metrics/Java/jdk1.5.0_07/bin/java

export CONST_LOC=/home/methct/metrics/MGConfig/staging_8103.xml

$JAVA_HOME view.main.MetricsMainFrame $CONST_LOC

i can close the openoffice doc that are generated by the java app, with no issues.

The problem is when I fire the java app from the perl script using the system call, then I won't be able to close the open office docs unless I close the java app.

Please let me know what you think

Houh

phranque

8:51 pm on Jan 25, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



system() seems like the right call here but have you tried exec() instead - just in case?

houh

9:19 pm on Jan 25, 2008 (gmt 0)

10+ Year Member



In fact I did. Same result with exec and backtick.

Houh

phranque

9:44 pm on Jan 25, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



sorry - didn't reread your OP.