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

This is because there are some 32-bit libraries missing in your Ubuntu 64-bit. Run:

apt-get install libc6-i386

you can refer to this Stack Overflow post for more information


I ran into a similar issue and got it solved by

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libc6-i386

If apt-get was not able to locate the libc-i386 package you may need to --add-architecture and run apt-get update.