"No such file or directory" when invoking java

Posted by Andrey Botalov on Ask Ubuntu See other posts from Ask Ubuntu or by Andrey Botalov
Published on 2012-10-28T09:03:46Z Indexed on 2012/10/28 17:17 UTC
Read the original article Hit count: 345

Filed under:
|
|
|

I'm trying to re-install Oracle JDK 7 32 bit to 64 bit Ubuntu (previously 64 bit JDK was installed). JDK is currently present at /usr/lib/jvm/jdk1.7.0. I invoke

sudo update-alternatives --remove "java" "/usr/lib/jvm/jdk1.7.0/bin/java"
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0/bin/java" 1

And then:

/usr/lib/jvm/jdk1.7.0/bin$ java
bash: /usr/bin/java: No such file or directory

Why java can't be invoked?

© Ask Ubuntu or respective owner

Related posts about installation

Related posts about command-line