Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run Apache Derby as windows service

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.

like image 312
Priyank Doshi Avatar asked Nov 28 '25 02:11

Priyank Doshi


1 Answers

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! ;-)

like image 133
npe Avatar answered Nov 30 '25 14:11

npe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!