I'm running the following command to try to switch to Java 1.6
$export JAVA_HOME=$(/usr/libexec/java_home -v 1.6)
But am getting the error
-bash: JAVA_HOME=/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home: No such file or directory
You have to leave the preceding dollar-sign off (export
instead of $export
):
export JAVA_HOME=$(/usr/libexec/java_home -v 1.6)