Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have installed java jdk, following the steps as described here but the problem is when i do which jav it gives me the output


but when i do java -version it says

bash: /usr/bin/java: No such file or directory

im using ubuntu 12.04 LTS...

share|improve this question
Please paste the output of ls -l /usr/bin/java. And if it is a link, also paste the output of ls -l of its destination. – binfalse Oct 13 '13 at 14:23
@binfalse lrwxrwxrwx 1 root root 22 Oct 13 18:29 /usr/bin/java -> /etc/alternatives/java – john Oct 13 '13 at 15:01
Does /etc/alternatives/java exist? – Kevin Panko Oct 13 '13 at 15:08
@KevinPanko nope :( – john Oct 13 '13 at 15:10
That explains the error you got. Now the next question is why not? – Kevin Panko Oct 13 '13 at 15:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.