25
18
I have installed Java-8. Now I wanted to go back to Java-7 by default so I type in...
/usr/libexec/java_home -v 1.7.0_40 --exec java -version
/usr/libexec/java_home -v 1.7.0_40 --exec javac -version
But I still see...
java -version
java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-b108)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b50, mixed mode)
This does work...
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_40.jdk/Contents/Home
But I would like a more permanent solution.
Anyone see what I am doing wrong?
2
One problem: JDK7 refuses to install if you already have JDK8. It points you to a URL on oracle.com for more info that gives you a 404. And, of course, the uninstall instructions for JDK8 don't work at all, so now I'm basically lost.
– Eric W – 2014-06-22T14:35:49.6331
just use jenv http://www.jenv.be
– madzohan – 2015-03-11T07:24:04.823