hakko wrote:toif wrote:If so, how can I find where Java7 is located?
In a Terminal window, you can run the command which java to tell which one is being used (which one is found first on path). You can also do java -version to see if it's expected outcome.
The path will depend on type of install (Oracle official / OpenJDK). Mine is in /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/bin/java.
I can't speak for Mountain Lion as I'm still running 10.7.4, but the way Apple wants you to deal with Java is to use the Java Preferences App (Applications > Utilities > Java Preferences). It will list all of the versions of Java installed and you can change the preferred order depending on which version you want Java applications and command line tools to use. If you need to set the JAVA_HOME environment variable, set it to JAVA_HOME=`/usr/libexec/java_home` (backticks, not single quotes). That will point to the version of Java you've put first in the list. If you only want to use Java 7, just move it to the top of the list in Java Preferences and you should be good to go.
In my case I have Java 5, 6, and 7 installed and decided to leave Apple's Java 6 as the default (for other apps), and point to Java 7 directly (/Library/Java/JavaVirtualMachines/jdk1.7.0_06.jdk/Contents/Home/bin) for subsonic.sh.