Re: OT: Runtime exec (again)

2004-12-02 Thread andy wix
Hi, The shutdown command now works OK. There have been a few issues with this that I didn't have in the right combination. The Tomcat service must have suitable permissions. To do this: - Under control panel select Admin tools -> Services - Right click Apache Tomcat service and select properties

Re: OT: Runtime exec (again)

2004-12-02 Thread Keshav Shetty
May be cmd.exe is not available within the path when executing from tomcat. Try to add full path and try. Alternatively find out what is the message returned when cmd.exe is executed within the tomcat(Not the return code). You can display this message using following code. exitValue = proc.wai

OT: Runtime exec (again)

2004-12-02 Thread andy wix
Hi, Still can't get this to work. There must be some reason why this won't run under Tomcat but does work stand-alone. I have also tried the Tomcat list to no avail. To recap, I am trying to execute the following code on an Xp box with Tomcat 5.0.27: Process proc = runtime.exec("cmd.exe /C shut