I set my JAVA_HOME using the instructions given here - https://gist.github.com/senthil245/6093389
Basically, we download a jdk bin file, unpack it, move it to /usr/lib/jvm and then set the environment variable JAVA_HOME using sudo vi /etc/environment
.
I entered and saved JAVA_HOME="/usr/lib/jvm/jdk1.6.0_31"
But, when I do echo $JAVA_HOME
, I get /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
Why does this happen and how can I fix it ?