I was setting up android studio and got this
So I followed the answer here and used
sudo update-alternatives --set java /usr/local/java/jdk1.7.0_17/jre/bin/java sudo update-alternatives --set javaws /usr/local/java/jdk1.7.0_17/jre/bin/javaws
But this gave me
update-alternatives: error: alternative /usr/local/java/jdk1.7.0_17/jre/bin/java for java not registered; not setting
How can I fix this and get android studio working? I am have openJDK installed.