grails/grails-core — pull request #196 by timyates (2012-05-10 13:52:02+00:00)
Title: Detect JDK using /usr/libexec/java_home

On my machine, CurrentJDK is not updated to point to Java 7
when I change the Java Preferences list order.

Therefore, the current symbolic link checking method does
not work, and returns Java 6. Using /usr/libexec/java_home
seems to work (at least for me)

See "Java Home" here:
http://developer.apple.com/library/mac/#qa/qa1170/_index.html