Microsoft Windows Service

OpenBD ships in many different flavours, but one of the most common bundles, is the Ready2Run OpenBD Jetty server. Getting Jetty to start up, when Microsoft Windows starts up can be a little tricky as Windows does not provide any simple hooks for Java processes.

Fortunately OpenBD+Jetty has solved this problem by integrating the Apache Daemon process into the bundle.


These instructions assume you have unzipped the Ready2Run OpenBD Jetty server in the c:\jetty-openbd\ folder. If you have not, then update the paths here to match your installation.

Open up a Command prompt and run c:\jetty-openbd\bin\serviceRegister.cmd. This is a small script that setups the service. The details of it are below.

			cd c:\jetty-openbd\
			bin\prunsrv //IS//JettyService --DisplayName="Jetty Service" --Install=C:\jetty-openbd\bin\JettyService.exe --LogPath=C:\jetty-openbd\logs --LogLevel=Debug --StdOutput=auto --StdError=auto --StartMode=Java --StopMode=Java --Jvm=auto ++JvmOptions=-Djetty.home=C:\jetty-openbd ++JvmOptions=-DSTOP.PORT=8087 ++JvmOptions=-DSTOP.KEY=downB0y ++JvmOptions=-Djetty.logs=C:\jetty-openbd\logs ++JvmOptions=-Dorg.eclipse.jetty.util.log.SOURCE=true ++JvmOptions=-XX:MaxPermSize=128M ++JvmOptions=-XX:+CMSClassUnloadingEnabled ++JvmOptions=-XX:+CMSPermGenSweepingEnabled --Classpath=C:\jetty-openbd\start.jar --StartClass=org.eclipse.jetty.start.Main ++StartParams=OPTIONS=All ++StartParams=C:\jetty-openbd\etc\jetty.xml ++StartParams=C:\jetty-openbd\etc\jetty-deploy.xml ++StartParams=C:\jetty-openbd\etc\jetty-webapps.xml ++StartParams=C:\jetty-openbd\etc\jetty-contexts.xml --StopClass=org.eclipse.jetty.start.Main ++StopParams=--stop

This technique can be used for any Jetty installation. Simply copy the c:\jetty-openbd\bin\JettyService.exe to your Jetty bundle and adjust the registration script accordingly.

Deleting the service

You can delete the service quickly by using c:\jetty-openbd\bin\serviceRemove.cmd

			cd c:\jetty-openbd\
			bin\prunsrv //DS/JettyService

Launch the Service Manager

You can launch the service manager, which is a GUI application by clicking here the c:\jetty-openbd\bin\JettyService.exe, but only after you have registered it.


  • Make sure you have tested the server runs up from the command line manually before registering it as a service
  • If all goes wrong, then delete the service and try again
  • Make sure the path matches the one you have installed OpenBD in
  • Adjust the memory requirements of your server before you register the service. The script assumes only 128MB
  • If your Java VM is not in the path, then you can put the path in using the serviceRegister.cmd for --Jvm="c:\program files\java\jre6\bin\server\jvm.dll"
  • If you are on 64bit, or AMD platform, then you can use the versions of the register service in the bin/daemon