DZone
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
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • How to Use Jenkins Effectively With ECS/EKS Cluster
  • Mastering Shift-Left: The Ultimate Guide to Input Validation in Jenkins Pipelines
  • Integrating Jenkins With Playwright TypeScript: A Complete Guide
  • Jenkins Pipelines With Centralized Error Codes and Fail-Fast

Trending

  • 8 RAG Patterns You Should Stop Ignoring
  • Java Backend Development in the Era of Kubernetes and Docker
  • DuckDB for Python Developers
  • What Is Plagiarism? How to Avoid It and Cite Sources
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. Make Jenkins Windows Service use your Preferred JRE

Make Jenkins Windows Service use your Preferred JRE

By 
Patroklos Papapetrou user avatar
Patroklos Papapetrou
·
Nov. 26, 13 · Tutorial
Likes (2)
Comment
Save
Tweet
Share
16.7K 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. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • How to Use Jenkins Effectively With ECS/EKS Cluster
  • Mastering Shift-Left: The Ultimate Guide to Input Validation in Jenkins Pipelines
  • Integrating Jenkins With Playwright TypeScript: A Complete Guide
  • Jenkins Pipelines With Centralized Error Codes and Fail-Fast

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

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

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook