Win a copy of Grokking Bitcoin this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
  • Carey Brown
  • salvin francis
  • Claude Moore

Starting/Stopping Tomcat windows service through Java  RSS feed

Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am writing a system to deploy tomcat wars across multiple tomcat installations.
I have been undeploying with tomcat manager, copying the war and deploying with tomcat manager.

However, due to flakiness with tomcat, or the manager, I would also like to restart the tomcat windows service.

Is there some magic in tomcat manager to shutdown tomcat? Then the windows service would restart it.
Otherwise, are there any libraries for accessing a remote windows machine and start/stop services?

Posts: 24374
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seems to me that the easiest method would be to use System.getRuntime().exec() to execute the Windows command to start and stop services. (Which I don't remember what they are, but I do remember that they exist.)
You get good luck from rubbing the belly of a tiny ad:
ScroogeXHTML - the small and fast RTF to HTML converter library
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!