tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sunil Chandurkar <su...@nagpurcity.net>
Subject How can I run Batch file from servlet ??
Date Mon, 16 Apr 2001 15:47:20 GMT
Hello All !! 

I am in big trouble, i want to call batch file on the server from the servlet. I have tried
the following option but they didn't work.. please let me know if is there any way to do it...


Process p = Runtime.getRuntime().exec 
("cmd D:\\myFolder\\myBatchFile.bat"); 
p.waitFor(); 

also i have tried without cmd option: 
Process p = Runtime.getRuntime().exec 
("D:\\myFolder\\myBatchFile.bat"); 
p.waitFor(); 

Its not throwing an exception and not even giving me any output.. 

Thanx in Advance...

/sunil 



_____________________________________________________________
Get LifeTime Free email Visit  ---> http://www.nagpurcity.net

Mime
View raw message