I would like to execute a Java program using system() in Perl. Although the execution command works fine in the command line, it does not work when I try to execute through a Perl script.
This is the stand-alone command:
c:\users/sophix/Desktop/prottest3/prottest3>java -jar prottest-3.0.jar -i alignment1.aa -t tree1.trees -o output1.out -all -verbose -all-matrices -threads 3 -G -F -all-distributions -ncat 4This works fine. Now when I want to embed this into a script to run it through many files, as follows
my $out = system("/users/sophix/Desktop/prottest3/prottest3/java -jar prottest-3.0.jar -i " . $name . "\.aa" . "-t " . $name . "\.trees" . "-o " . $name . "\.out" . "-all -verbose -all-matrices -threads 3 -G -F -all-distributions -ncat 4");I get the following error: '/users/sophix/Desktop/prottest3/prottest3/java' is not recognized as an internal or external command, operable program or batch file.
Any idea for why it is not working?
Thanks
In reply to Calling Java using system() by sophix
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |