I am trying to run a Perl program in Java.
I'm using:
process = Runtime.getRuntime().exec("getComps.pl");
but it is giving:
Exception: java.io.IOException: Cannot run program "getComps.pl": CreateProcess error=193, %1 is not a valid Win32 application
I have also tried:
process = Runtime.getRuntime().exec("cmd /c start getComps.pl");
process = Runtime.getRuntime().exec("cmd /c call getComps.pl");
But this is not giving any output.
It is giving the empty file after executing the program and taking lots of time to execute.
Is there an efficient way to call a Perl program from Java?