Only Software matters

Experiences in software development

  • Enter your email address to follow this blog and receive notifications of new posts by email.

    Join 632 other followers

  • MVB

  • JavaCodeGeeks

    Java Code Geeks

  • My recent tweets

    • RT @vkalaitzi: Βλέπω κάτι βαθυστόχαστες παπαριές με 800 RT κ λέω, τι φάση; Μετά θυμάμαι τις κάμποσες χιλιάδες που ψήφισαν Βαρουφάκη κ μου π… 18 hours ago
    • RT @omadaalithias: http://t.co/JthwuIfv0o 18 hours ago
    • RT @akis_koronaios: Δεν είναι ντροπή για την Ελλάδα να θέτει προαπαιτούμενο το ΔΝΤ να μην ξανά δουλέψουν στο Δημόσιο όσοι έχουν πιαστεί με … 18 hours ago
    • RT @KaragiozMperde: Είσαι από αυτούς που λένε, μην κρίνεις τους ανθρώπους από το «εξώφυλλο». Κι έρχονται αυτοί και σου το γαμάνε! http://t.… 18 hours ago
    • RT @tazmanolis: Τώρα λοιπόν που ο ΣΥΡΙΖΑ παραδέχθηκε ότι μοναδική λύση ήταν μνημόνιο,μπορούμε να πούμε ότι έχει τεράστια-καταστροφική ευθύν… 18 hours ago

Make jenkins Windows service use your preferred JRE

Posted by Patroklos Papapetrou on November 21, 2013


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. Forutenately 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!

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

Join 632 other followers

%d bloggers like this: