Execute external program from tomcat servlet

From: Fredrik (eelector_at_hotmail.com)
Date: 09/28/04


Date: 28 Sep 2004 14:46:07 -0700

I want to execute external programs (in this case batch-files)
server-side, and capture the output. I've read about Runtime.exec and
the different problems with reading the input stream.
Despite having tried a bunch of examples, I haven't been able to get
any of them to work when executed by tomcat (running as a service on
win2003svr, user "local system account" ).
As a stand-alone java program there is no problem executing the
batch-file. What could be the cause of my problem?