Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

I am running Tomcat as an NT service. How do I write a command file or a batch file that should run a Java class (or a jar file) and restart the Tomcat service (so that the java class results can take effect)?

0
10 Posted

I am running Tomcat as an NT service. How do I write a command file or a batch file that should run a Java class (or a jar file) and restart the Tomcat service (so that the java class results can take effect)?

0
10

Location: http://www.jguru.com/faq/view.jsp?EID=562282 Created: Nov 27, 2001 Author: Michael Lantzen (http://www.jguru.com/guru/viewbio.jsp?EID=547100) Question originally posed by anuj suri (http://www.jguru.com/guru/viewbio.jsp?EID=497074 You can do a youscript.cmd file and put 4 lines into it cd \directory\with\YourClass java YourClass net stop Tomcat net start Tomcat that’s it, assuming that you named your service Tomcat.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123