Question : Launch batch command file from java application on WAS 5.1

I have a java application that runs on WAS 5.1.  I am trying to launch a batch command file from the java application.  When I am testing this from my developer machine, this runs with no issues.  I create the command file to a local drive, then I launch the command file.  However, when deploy this to my application server, the command file does not get launched.  The command is created, but it does not get executed.  The exit value is 0.  It appears to just skip over the execution statement.  If I click on the command file that was created it runs with no issue.  I really neeed to resolve this issue, if anyone could please help.
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
if(fileCreated){
								  try{
		System.out.println("Processing Monthly Transmital");
		Process monthlyTransmittal = Runtime.getRuntime().exec("cmd /c start d:/batch/bin/iftamonthly.cmd");
								  } catch (Exception e) {
									// TODO Auto-generated catch block
									e.printStackTrace();
									success = false;
								  }
							  }

Answer : Launch batch command file from java application on WAS 5.1

   Hi Mike!

Try this version of Runtime.exec

Process monthlyTransmittal  = Runtime.getRuntime().exec(new String[] {"cmd", "/c", "start", "d:/batch/bin/iftamonthly.cmd" });

Regards,
    Tomas Helgi
Random Solutions  
 
programming4us programming4us