-
Executing Perl!
Hello All!
I am new to java. i want to run my perl script from java. i dont know what mistake i am doing, i am not able to execute my perl script. i can call my perl script with two arguments. i am able to run it successfully when i made a batch file. i dont know why it is not working in java. following is the code.
try
{
pathn1 = "C:\\Program Files\\jambo\\gritchy\\kakae";
fname1 = alpine.wav ;
Process p = Runtime.getRuntime().exec("C:/perl/bin/perl.exe C:\\Perl\\scripts\\varm.pl \"pathn1\" fname1");
int fg = p.waitFor();
if (fg == 0)
{
loginfo("successfull");
}
else {
loginfo("failed");
}
}
catch(Exception e)
{
loginfo("Exception running varm");
}
Please help me
-
Don't double post.
kind regards,
Jos
-
ok,Sorry Joash..i was just confused that if it could be better to put this problem infront of experts..
i will not do it agian.:)
-
Thanks Jos. Locking this duplicate post.