Java Runtime Environment error when installing Jenkins on OS X Yosemite

Today I was setting up a new CI server for our Xamarin builds on a brand new Mac Mini running OS X Yosemite. It was a clean machine so I started from scratch using the instructions from the Xamarin guide: Using Jenkins with Xamarin – Configuring Jenkins to Power a Xamarin Continuous Integration on OS X.

Now, after you see this dialog it should open Safari and launch the Jenkins administration web interface.

jenkinsdialog

However, you will be greeted by this dialog instead

yosemite-jre

This is because Jenkins uses Java and Java is not installed yet. The More Info… button redirects you to the Oracle download page where you can install Java 8.

oracle-java-for-os-x

Okay, so we install Oracle Java 8. Meanwhile the pop-up keeps crying for attention which is pretty annoying. After installing Java 8 I press OK on the dialog expecting that the issue has now been fixed and I’m taken to the admin page, but no luck.

Google to the rescue! It appears I’m not the only one with this problem. The problem is that the link to the Oracle website is THE WRONG LINK! You should be installing the Apple version of Java which can be found HERE. Not sure why you need an Apple version of Java, I always thought it was  “Write Once, Run Anywhere”, but apparently that’s not true 🙂

java-for-os-x-2014-apple

After installing this version it worked fine and I was taken to the Jenkins admin page. There I soon locked myself out by enabling the Jenkins security without proper thought, but that’s the topic of another post. 🙂

TO BE CONTINUED…