struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "andy wix" <stix...@hotmail.com>
Subject Re: OT: Runtime exec (again)
Date Thu, 02 Dec 2004 17:02:33 GMT
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
- Select the logon tab
- Under 'This account' select a user account with administrator role.

Not that Windows 2K doesn't come with a shutdown command.  There is one 
supplied with the Win2K resource kit.

- The command must be run from the overloaded exec method that takes a 
String array as it will not work declared as a string.
- Both output and error streams must be read otherwise the process will 
hang.
(see http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html)

- The code will not run from a batch file.

Thanks for your help.

Andy

_________________________________________________________________
Want to block unwanted pop-ups? Download the free MSN Toolbar now!  
http://toolbar.msn.co.uk/


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message