"No such file or directory" when invoking java
- by Andrey Botalov
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?