Front page | perl.beginners |
Postings from August 2009
calling Jar file
Thread Next
From:
lemba
Date:
August 19, 2009 16:08
Subject:
calling Jar file
Message ID:
4A8C85F0.7000706@sbcglobal.net
Hi All,
My perl script is wrapper for Java program. So, I'm calling the jar file
in my script.
my $compiler = "Compiler.jar"
system ( "java -jar $compiler arg1 arg2 arg3" )
or in this way
my @args = ( "java", "-jar", "$compiler", "arg1", "arg2", "arg3" );
system( @args )
Both approaches are not working as expected. They execute jar ok but
java is crasing somewhere and gives error.
I did workaround. I created ms-dos batch script and execute jar with the
same command. Works perfect! The bad thing about ms-dos batch scripting
that it doesnt support arrays.
So I'm stuck. The last thing I tried, I'm calling the batch script
inside perl, which calls jar. Same error. I believe something is wrong
with perl shell. Any ideas? Any help will be much appreciated.
Kind Regards,
Vladimir
Thread Next
-
calling Jar file
by lemba