I recall that when Java 6 first came out, Mac OS X did not support it at first and it was only when Java 6 got full support by Apple that I decided to switch to a Mac. Now, years later Java 7 is out on Windows/Linux/etc and I have been feeling a bit cheated by Apple since they won’t provide Java 7 and have in fact decided to drop Java support in OS X in the future.
To get Eclipse 3.7.1 to work with Java 1.7 (EA) on Mac OS X do the following.
1) Install Java 7 but leave the more complete+stable Java 6 as the default Java on Mac OS X.
2) Install Eclipse and let it run under Java 6.
3) Start Eclipse, select Preferences, Installed JREs, Execution Environments and click on “add”.
4) Select standard VM.
5) In the field JRE home, do not attempt to browse for the Java 7 directory as this will not work. Instead just paste the installation dir of the installed Java 7 package +/Content/Home (fx. “/Library/Java/JavaVirtualMachines/JDK 1.7.0 Developer Preview.jdk/Contents/Home”) into the JRE home text field and press return.
6) Fix the JRE name in the field below to something suitable like “JDK1.7″ and click finish.
Now you should be able to create your Java 7 project in eclipse on your Mac OS X and you should be able to run/debug without problems…. Yes!