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
Newsletter
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

  • Testing Java and Spring Applications With Kotlin: Low-Risk to Adoption
  • How an AI Software Factory Works: From Developer Intent to Production
  • Avoiding AI Debt as a Team
  • The Three Tiers of Agentic Incident Response: When to Trust AI Autonomy

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  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
·
Nov. 26, 13 · Tutorial
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
16.9K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

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

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • 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