Missing tools.jar (Android Studio)
Solution 1:
As per output mentioned for command
sudo update-alternatives --config java
I can see that you have only JRE installed but you also need JDK to compile and run the code.
You can install JDK for Java 8 using following command :
sudo apt-get install openjdk-8-jdk
And then run
sudo update-alternatives --config java
command and select JDK instead of JRE.
Solution 2:
I was getting the same error, and found that I did not have the java compiler installed.
Try javac -version
and see if you have it installed. If not,
sudo apt-get install openjdk-7-jdk
and hopefully that will fix your problem.
EDIT: I see now after rereading that you have already installed the jvm once, but I had it installed as well, so I'm not sure if something got updated or what but like I said it worked for me.
Solution 3:
I had the same problem. There has nothing to do on JAVA_HOME or configure-alternatives. The truth is there is no tools.jar in oracle-java-9(even in open-jdk). To use android-studio in the Ubuntu you must use java-8. Why? I don't know and I don't care! I must to learn Android Studio, so whatever...
Install jdk-8 for android-studio, change PATH and JAVA_HOME environment and be happy!
Works for me...