Finding the current system JAVA_HOME on mac osx 10.5+

Posted: 2012-01-03

I always forget where this file is located - so just as a reminder ;)

To find the current JAVA_HOME for the current user (set by java preferences) run:

/usr/libexec/java_home

Details from http://developer.apple.com/library/mac/#qa/qa1170/_index.html