I just installed openjdk-8-jdk. I already had openjdk-7-jdk installed. When I ran
echo $JAVA_HOME, it printed
So I tried changing the $JAVA_HOME variable but it resets to above path every time I re-open the terminal.
I have tried setting it in
~/.bashrc but to no avail.
How can I change it? Also, where the $JAVA_HOME is currently set?