Question: I upgraded my OS X to Yosemite and now my IntelliJ IDE is not starting.

Here is the error message:

> 
> To open “IntelliJ IDEA” you need to install the legacy Java SE 6 runtime.
> 
> 
>

Answer: 
I found that installing [Java for OS X 2014-001](http://support.apple.com/kb/DL1572?viewlocale=en_US&locale=en_US) after upgrading to Yosemite has solved it for me.
OSX has its JDKs in the folder `/Library/Java/JavaVirtualMachines/`.
There can be multiple versions there, for e.g. 1.7 or 1.8.

As indicated by @CrazyCoder, IntelliJ needs a 1.6 version to be present there, which Yosemite kicked out (in favor of a 1.7 if I'm not mistaken).

To install jdk 1.6, you can indeed simply use the [dmg from apple](http://support.apple.com/kb/DL1572?viewlocale=en_US&locale=en_US) as recommended by @CrazyCoder and confirmed by @LanceP.

As a [homebrew cask](http://caskroom.io/) user, I installed via

```
brew tap caskroom/versions
brew cask install java6

```

After this, IntelliJ was up and running again.

See also this [useful post](http://hanxue-it.blogspot.ca/2014/05/installing-java-8-managing-multiple.html) on managing multiple Java versions on OSX.