0

Why does the terminal say java doesn't exist?

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

3
  • What is the output of file /usr/lib/jvm/java-7-oracle/bin/java? Jun 4, 2013 at 13:03
  • Need whole output of file .... Jun 4, 2013 at 13:26
  • So +1 on the comment. It was a 32 bit OS, but they downloaded the x64 JDK. It pointed me in the right direction so it helped. Thanks Jun 4, 2013 at 14:16

1 Answer 1

1

/usr/bin/java is a symbolic link to whichever is the current system version of java. The error indicates that the link is currently pointing to a file that no longer exists. (Use ls -al /usr/bin/java to see which).

You need to run sudo update-alternatives --config java and select Oracle Java 7 as the desired version, and it should correct all the java related links for you. I would have expected the installation process for this java package to have done this, but evidently something went wrong.

3
  • see 4th screenshot Jun 4, 2013 at 12:50
  • Hmm, the links do appear to be set up correctly. Do you still get a file not found error if you try and do /usr/lib/jvm/java-7-oracle/bin/java directly in a terminal?
    – chronitis
    Jun 4, 2013 at 13:02
  • no such file or directory Jun 4, 2013 at 13:07

Not the answer you're looking for? Browse other questions tagged .