Q:

Setting JAVA_HOME to point to JDK properly?

Hello I have a noob question. I am trying to run Android Studio on my Arch Linux in the /android-studio/bin directory using: ./studio.sh. However, I keep receiving this message: JDK Required: 'tools.jar' seems to be not in Studio classpath. Please ensure JAVA_HOME points to JDK rather than JRE. 
So what I did was opened ~/.bashrc and inserted this 
JAVA_HOME='/java-7-openjdk/jre'
export JAVA_HOME
PATH="$JAVA_HOME/bin:$PATH"
export PATH
After rebooting, I still came across the following issue of the requirement. I am confused as to which part of the /path/to/java goes in JAVA_HOME='?????'
In the terminal, when I do which java, it shows /usr/bin/java
and when I do whereis java, it shows
java: /usr/bin/java /usr/share/java /usr/lib/jvm/java-7-openjdk/jre/bin/java /usr/share/man/man1/java.1.gz
and as for archlinux-java status it also shows java-7-openjdk/jre (default) what is the exact path to put specifically?

A:

use java 8 for android studio
i think it will take only java 8

