So java -version give path not found. I have tried the following: Edit:
bash.bashrc files and add to them the following:
JAVA_HOME=/usr/lib/jvm/jdk1.7.0_15 PATH=$PATH:$HOME/bin:$JAVA_HOME/bin JRE_HOME=/usr/lib/jvm/jre1.7.0_15 PATH=$PATH:$HOME/bin:$JRE_HOME/bin export JAVA_HOME export JRE_HOME export PATH
In addition, I also manually added the java bin directory to PATH.
I have restarted my computer several times but I still get
bash: /usr/local/bin/java: No such file or directory