Tim Holloway wrote:Actually, now that I look at the original question, yes, there are several ways in Java to start/stop apps in Java code.
I believe JSR-77 specifies one of them. JMX provides another, I think. Neither requires the existence of an external program such as wget.
William Brogden wrote:Whats wrong with using java.net.HttpURLConnection and the rest of the standard library to do a GET request and read the response?
Why would you need to create a Process?
William Brogden wrote:401 = UNAUTHORIZED - the management app is protected, you need a user in the "managememt" role in order to run the manager app.
William Brogden wrote:Note that you have to restart Tomcat if you change the users xml file.
If that works then http://username:userpw@yoursite/manager.... etc should work as the url to GET