views:

20

answers:

1

I have a servlet with its package comes with Tomcat preconfigured. A batch file is provided to start the servlet with Tomcat. Now I would like to install it as a windows service. I've done so successfully with exe such as SVN server, but since Tomcat starts with a batch file, I can't install the batch file as service, as it won't run and will always give error that the service does not start in a timely manner. Preferable I don't want to start the tomcat exe directly and configure the enviroment variable by hand.

Is there a way to invoke the batch file properly as a windows service?

A: 

I have tried many solutions, and the simplest and best way was just to set it up as a task using Task Scheduler. I just set it to start with startup, and it was always running for me.

esac