running a jar file via perl cgi
- From: Butterpants <admin@xxxxxxxxx>
- Date: Wed, 20 Jul 2005 19:15:31 -0400
I have a jar file that works well by typing on the shell ../java -jar myjar.jar in.txt out.txt
but when i try to create a cgi script it will not write the out.txt file
There is a textarea form as the input, when user hits submit the script below gets called. The script gets as far as writing the in.txt file with the correct contents but no out.txt file is created so the problem must lie with executing the jar file. Any idea why not?
#!/usr/bin/perl
use strict;
use CGI qw/:standard/;
my $goal=param("goal");
print header;
print start_html;
print "<h3>co</h3>";
print "<xmp>\n";
print "goal is this: $goal";
print `echo "$goal" > in.txt`;
print `./java -jar ModuleB.jar in.txt out.txt`;
print `cat out.txt`;
#print `rm -f in.txt out.txt`;
print "</xmp>\n";
print end_html;
.- Follow-Ups:
- Re: running a jar file via perl cgi
- From: bernd wegener
- Re: running a jar file via perl cgi
- Prev by Date: Re: Drawing translucent masks
- Next by Date: Re: Socket failure following writeObject
- Previous by thread: Drawing translucent masks
- Next by thread: Re: running a jar file via perl cgi
- Index(es):