Why does the terminal say java doesn't exist?
1 Answer
/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.
-
-
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? Jun 4, 2013 at 13:02 -
file /usr/lib/jvm/java-7-oracle/bin/java
?file ...
.