home directory. Similarly, if you are using Groovy, you might need a .groovy/lib directory. And so
on. To allow this, and to make testing your Jenkins install easier, make sure you run this service under
a real user account with the correct development environment set up (see Figure 3.6, “Configuring the
Jenkins Windows Service”). Alternatively, run the application as the system user, but use the System
Information page in Jenkins to check the /Users/johnsmart/Projects/Books/jenkins-the-
definitive-guide directory, and place any files that must be placed in the user home directory here.
Figure 3.6. Configuring the Jenkins Windows Service
You configure the finer details of the Jenkins service in a file called jenkins.xml, in the same directory
as your jenkins.war file. Here you can configure (or reconfigure) ports, JVM options, an the Jenkins
work directory. In the following example, we give Jenkins a bit more memory and get it to run on port
8081:
<service>
<id>jenkins</id>
<name>Jenkins</name>
<description>This service runs the Jenkins continuous integration system
</description>
<env name="JENKINS_HOME" value="D:\jenkins" />
<executable>java</executable>
<arguments>-Xrs -Xmx512m
-Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle
-jar "%BASE%\jenkins.war" --httpPort=8081 --ajp13Port=8010</arguments>
</service>
Finally, if you need to uninstall the Jenkins service, you can do one of two things. The simplest is to
run the Jenkins executable with the uninstall option: