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)?
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
- 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)?
- How do I run a downloaded Java Archive file (.jar file) from the command line?
- Can i run StarPinger from command line, script or batch file?