I am using apache derby in our project. Every time,I have to manually start server of derby, i.e. run startnetworkserver.bat . Is is possible to install it as a windows web service? And I would also want to add the service in windows startup list. So that each time I start the system, it will automatically get started.So,I dont have to manually start server. I am using apache tomcat as windows service. I want to do same for derby.
Take a look at Apache Procrun. Its a Windows executable, that allows you to install / uninstall java programs as Windows services.
Installation of the service goes as follows (from the project site):
prunsrv //IS//TestService --DisplayName="Test Service" \
--Install=prunsrv.exe --Jvm=auto --StartMode=jvm --StopMode=jvm \
--StartClass=org.apache.SomeStartClass --StartParams=arg1;arg2;arg3 \
--StopClass=org.apache.SomeStopClass --StopParams=arg1#arg2
After that, you just start/stop the service using:
net start TestService
net stop TestService
or using Services view from My Computer.
Oh, and it's free! ;-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With