Call PERL script from JAVA
807605Jun 14 2007 — edited Jun 14 2007I am facing a problem in running a PERL script in JAVA in UNIX box..
I am able to call ther perlscript.
Perl script has
##########################
#! /usr/local/bin/perl
print "\nEnter Your Name :";
$name = <>;
print "\nYour Name is : $name\n";
exit 0;
####################################################
Perl script request for the INPUT(name) .
My Java program is
File perlfile = new File("test.pl");
Runtime runtime = Runtime.getRuntime();
Process process = runtime.exec("perl "+perlfile);
####################################################
Here is the problem tat IT IS says error =2 ..What has to be the solution so tat i can CALL PERL SCRIPT as similiar to running it separatly in prompt { >perl test.pl }
PLEASE help me on this....