I've installed Java 8 for development purposes but now I'd like to use Java 7 again.
How do I do this?
It seems to be insanely difficult.
Many thanks in advance. (I've tried using guigarage and that doesn't work)
From a terminal: export JAVA_HOME=`/usr/libexec/java_home -v 1.x`
, where x is the Java version.
I personally have a shell function that does that for me:
use-java () {
export JAVA_HOME=`/usr/libexec/java_home -v 1.$1`
}
I just have to call use-java 7
or use-java 8
in order to change my current shell's Java version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With