Cannot install java after apt-get upgrade

view story

http://unix.stackexchange.com – When I execute java -version, I get this: bash: /usr/bin/java: No such file or directory I followed multiple online guides towards installing java. I followed all the steps but I still get that error. Maybe I did it wrong - I don't know. Output of: dpkg -l jdk* dpkg-query: no packages found matching jdk* Output of: ls -l /usr/bin/java lrwxrwxrwx 1 root root 22 Nov 16 17:21 /usr/bin/java -> /etc/alternatives/java Output of: sudo add-apt-repository ppa:webupd8team/java add-apt-repository: command not found Output of: file "$(readlink -e "$(type -P java)")" /usr/local/java/jdk1.7 (HowTos)