I've installed java by following this instruction and also had installed java 7 from elsewhere but I can't seem to get it to work.. every time I type in java -version via terminal (I am ssh-ing to an ubuntu server) I get this:
root@ip-(...):/# java -version
bash: /usr/local/bin/java: No such file or directory
This is my Path variable:
root@ip-(...):/# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/root/bin:/usr/local/java/jre1.7.0_09/bin:/root/bin:/usr/local/java/jre1.7.0_09/bin
The path variable has two mentions of jre/bin
but apart from that I don't see anything strange (and this was because I installed it twice? - but either way, it shouldn't matter)
So how do I debug why my java -version
returns no such file or directory
error when I can clearly see that the directory does have java in it?
I don't know what other info I need to provide since I am a ubuntu beginner, but please ask if you need anything else.