In a situation where the Mac OS X default Java is not the one you need for your app to use there is a way to force it to pick the version you want.
* Right click on your Eclipse.app in the Finder
* Select “Show Package Contents”
* Go to Contents/
* Open Info.plist in an editor
* Add the line
<string>-vm</string><string>/System/Library/Frameworks/
JavaVM.framework/Versions/1.6.0/Commands/java</string>
for setting Java 6
Otherwise you can change the default version of java as well in the Java properties. I have noticed a bug in it. I had the right setting, but it only took effect after I moved the versions around a bit . On one MacBook it still didn’t open the application with the right Java version so it had to be forced like described above.