Manually installing Java on OS X Lion

Today I hit yet another problem with my upgrade: IntelliJ IDEA wouldn’t start. It prompted me:

To run “IntelliJ IDEA 10”, you need a Java runtime. Would you like to install one now?

Clicking “Install” on the dialog went out to try to download the software, but then just popped up another warning box:

The software is currently unavailable.

To install a Java runtime later, open “IntelliJ IDEA 10” again.

Well that’s not very helpful. Unsurprisingly, repeatedly opening IntelliJ IDEA did nothing to solve the problem.

After scouring the Apple forums, it turns out there is a public download available in their support site: Java for OS X Lion. I downloaded and installed this and I was good to go.

See also my earlier notes on the Lion upgrade:

Update 31 August

It turns out that the root cause of this problem is because we use an internal update server at work and the server hasn’t yet been updated to work with Lion. You can check this with the defaults command for both user and system-wide software update settings:

$ defaults read
$ defaults read /Library/Preferences/

If the output of either includes a ‘CatalogURL’ value, then you have a custom update server. Switching back to the default Apple update server solved the problem for me, and also made the 10.7.1 update available.

Here’s how you reset a system-wide custom update server:

$ sudo defaults delete /Library/Preferences/ CatalogURL

Once our IT team gets the update server up-to-date, I’ll be using defaults write to set the CatalogURL back to our internal server for faster updates again.

Portrait of Matt Ryall

About Matt

I’m a technology nerd, husband and father of four, living in beautiful Sydney, Australia.

My passion is building software products that make the world a better place. For the last 15 years, I’ve led product teams at Atlassian to create collaboration tools.

I'm also a startup advisor and investor, with an interest in advancing the Australian space industry. You can read more about my work on my LinkedIn profile.

To contact me, please send an email or reply on Twitter.