"Please ensure you have JAVA_HOME points to JDK rather than JRE" message

Posted by Alex Malex on Ask Ubuntu See other posts from Ask Ubuntu or by Alex Malex
Published on 2013-05-17T13:34:35Z Indexed on 2013/11/06 22:08 UTC
Read the original article Hit count: 367

Filed under:
|
|
|
|

I have java installed

aaa@ubuntu:~$ whereis java
java: /usr/bin/java /usr/bin/X11/java /usr/local/java /usr/share/java
aaa@ubuntu:~$ whereis javac
javac: /usr/bin/javac /usr/bin/X11/javac

and etc/profile

JAVA_HOME=/usr/local/java/jdk1.7.0_17
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
JRE_HOME=/usr/local/java/jre1.7.0_17
PATH=$PATH:$HOME/bin:$JRE_HOME/bin
export JAVA_HOME
export JRE_HOME
export PATH

However, when I run Android Studio, it says:

tools.jar in not in Android Studio classpath. Please ensure you have JAVA_HOME points 
to JDK rather than JRE.

How do I fix it?

update

sudo update-alternatives --get-selections | grep ^java 
java                           manual   /usr/local/java/jre1.7.0_17/bin/java
javac                          manual   /usr/local/java/jdk1.7.0_17/bin/javac
javaws                         manual   /usr/local/java/jre1.7.0_17/bin/javaws


java -version
java version "1.7.0_17"

© Ask Ubuntu or respective owner

Related posts about 12.10

Related posts about java