- Computers & Software
How To Run Fitnesse As A Windows Service
Before We Begin
Fitnesse, like many Java applications, doesn't come with an installer package for Windows. It doesn't automatically itself as a Windows service, so it doesn't automatically start when your system boots up. Fortunately, we can set it up as a service ourselves with a little work.
Before we can get started, you'll need to download the Windows Server Resource Kit to your computer. It has some tools we'll need to get everything set up.
Installing Fitnesse As A Service In Windows
Once it is installed, run the resource kit command prompt, and enter: "instsrv.exe Fitnesse C:\Windows\srvany.exe" without the quotes. Note that the file path for srvany.exe may be different on your system. It depends on the installation path you choose.
Next, you'll need to open the registry editor. Drill down to the following path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Fitnesse. The Fitnesse registry key was created when we ran the instsrv.exe command in the last step. Create a subkey named "Parameters" under the Fitnesse key.
You will create three string values under the Parameters subkey you just created. The first is called "Application". Set the value to the file path for java.exe on your system. The second value is "AppDirectory". Set the value to the file path for your Fitnesse directory. The last value is called "AppParameters". Set the value equal to the paramters used when Fitnesse is launched. If you're unsure what to use, check the startup batch file located at the root of your Fitnesse directory. It has some default parameters that Fitnesse is launched with.
At this point, if you open your Services management console you should see an entry for Fitnesse. You can configure it to startup automatically. Start the service now to verify that it works. If you run into any issues here, you'll need to double-check the registry entries created in the last step. Otherwise, you're all set! Fitnesse should startup with Windows from now on.