Trying installing Java, I tried to add it to the executable path with the line:
in the system-wide /etc/bash.bashrc file.
For some reason this wasn't working so i used:
JAVA_HOME=/usr/lib/jvm/jdk1.7.0_60 PATH=$PATH:$HOME/bin:$JAVA_HOME/bin export JAVA_HOME export JRE_HOME export PATH
initially this seemed to work fine except that now
find and everything else aren't working anymore.
I then tried to erase those lines and restart the system but the command weren't available; the errors are:
Command 'sudo' is available in '/usr/bin/sudo' The command could not be located because '/usr/bin' is not included in the PATH environment variable. sudo: command not found
To fix this I copied the content of
/etc/bash.bashrc, added the line
export PATH=$PATH:/usr/lib/jvm/jdk1.7.0_60/bin and then typed
Again, everything was working, but only on a single terminal window and not after a restart.
I tried other things and currently at the end of bash.bashrc there are the lines:
export PATH=$PATH:/usr/lib/jvm/jdk1.7.0_60/bin/ export JAVA_HOME=$JAVA_HOME:/usr/lib/jvm/jdk1.7.0_60/bin/java/
but I have to type "source /etc/environment" and "source /etc/bash.bashrc" in all terminal windows to get both java and the commands. It's like my changes aren't permanent.
Currently the result of "echo $PATH" in a clear terminal window is:
after "source /etc/environment" it becomes:
and eventually, after "source /etc/bash.bashrc" it is:
Anyone can help me? I'm under Ubuntu 12.04 LTS