I have a Mac with OS Snow Leopard (10.6.8). I want to develop with JDK 7 but Oracle's website says JDK need OS 10.7.3 and later. So I followed some questions and answers on a similar topic here on Stackoverflow and found the following answer (by @larsac), using Pacifist to install JDK 7:
"The answer from @reukiodo is definitely the way to go, so thanks a bunch!. However, it might need some further explanation for newbs like myself.
1) Download the two DMG's that @reukiodo posted links to.
2) Install Pacifist.
3) Open the java-DMG with pacifist.
4) In the 'Package Contents'-tab (default tab), select the 'Contents of JDK 7 Update XX.pkg' (XX being e.g. 51).
5) Click the 'Install' button and follow the on-screen instructions.
6) Open Java Preferences.app in yout Utilities folder and drag Java SE 7 to the top of the list of Java versions in the 'General'-tab (default tab)."
I followed all these steps: as far as step 5) everything works fine, but then step 6) doesn't work for me, i.e. when I open my Java Preferences.app I have no Java SE 7 so I cannot drag it!