DZone
DevOps Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > DevOps Zone > Make Jenkins Windows Service use your Preferred JRE

Make Jenkins Windows Service use your Preferred JRE

Patroklos Papapetrou user avatar by
Patroklos Papapetrou
·
Nov. 26, 13 · DevOps Zone · Tutorial
Like (2)
Save
Tweet
15.69K Views

Join the DZone community and get the full member experience.

Join For Free

recently i was working on installing and configuring a new instance of jenkins . for some reason, which is out of this post’s context, i wanted to make jenkins run with a specific version of the java environment. fortunately it was something really easy. this post is mainly a reminder to me, next time i’d like to do the same :)

jenkins by default uses the jre which located under the jre sub-directory of your jenkins installation home ( %jenkins_home ).

to change this find the file named jenkins.xml in which is located in your %jenkins_home directory.

edit it and look for the following section

 <executable>%base%\jre\bin\java</executable>

now change the content of the executable property to point to your favorite jre. you can describe it as an absolute or relative path or you can even use, environment variables.

save the file and restart jenkins.

that’s it!

enjoy!

Jenkins (software) JRE

Published at DZone with permission of Patroklos Papapetrou, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • What Is Edge Compute? It’s Kind of Like Knitting Dog Hats
  • Python 101: Equality vs. Identity
  • Kafka vs. JMS: Which One Should You Be Using?
  • Everything You Need to Know About Building MVP With React and Firebase

Comments

DevOps Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo