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?
Firstly, using locate to find out where the tools.jar was located:
updatedb && locate tools.jar
Sample output
/opt/jdk1.7.0_55/db/lib/derbytools.jar
/opt/jdk1.7.0_55/lib/tools.jar
/opt/jdk1.7.0_55/lib/visualvm/visualvm/modules/com-sun-tools-visualvm-tools.jar
Then set JAVA_HOME,PATH on ~/.bashrc
export JAVA_HOME=/opt/jdk1.7.0_55
export JRE_HOME=/opt/jdk1.7.0_55/jre
export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/jre/bin
after that relogin session or
source ~/.bashrc
use java 8 for android studio
i think it will take only java 8
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With