can't execute perl script from java
807603May 24 2005 — edited Nov 15 2007I have a Perl script located in a directory on my hard drive that I want to execute from within a Java servlet. The directory it is located in is "C:\Documents and Settings\brubaker\jbproject\PILOT\PILOT\files\uploads\testcase". The filename is "cml2.pl". I currently have this code that is trying to run this script and it's not working(and not giving me any error messages either). The script works fine when run manually from the command prompt of DOS.
String executionString = "cd \"" + pilotConstants.filepath + "\\uploads" + (zippy.getName()).substring(zippy.getName().lastIndexOf("\\"), zippy.getName().lastIndexOf(".")) + "\"";
Process p = Runtime.getRuntime().exec(executionString);
executionString = "perl cml2.pl";
p = Runtime.getRuntime().exec(executionString);
Any help would be greatly appreciated!
Thanks!