0
'tools.jar' seems to be not in Studio classpath.
Please ensure JAVA_HOME points to JDK rather than JRE.

That showswhen i run studio.sh. I have searched it in web and on this site. I know there are already solved topics, but I tried them and it didn't worked.

Im using ElementaryOS (Linux).

I have already installed JDK and the /etc/environment file is edited already, so why it shows?

2 Answers2

0

Be sure you have a JDK installed on your system.

sudo apt-get install openjdk-7-jdk

Link to source https://askubuntu.com/questions/122133/tools-jar-is-not-in-idea-classpath

Community
  • 1
  • 1
ArtPaul
  • 1
  • 1
  • "I have already installed JDK and the /etc/environment file is edited already" but thanks you tried to help –  Oct 16 '15 at 19:19
0

It seems that JAVA_HOME is either not set, or is pointing to JRE and not JDK.

  1. Make sure you have JDK 7 or 8 in your system.
  2. Add the JDK home path to the Environment Variable JAVA_HOME

I am not sure what you tried already, so you can try out these:

tools.jar seems to be not in Android Studio classpath on Windows 8

Android Studio 'tools.jar' file is not present in classpath

Tools.jar is not in Android Studio classpath

PS: It would be helpful if you could list down all that you tried out to fix this issue, since this particular issue already had multiple answers in various threads.

Community
  • 1
  • 1
Henry
  • 17,490
  • 7
  • 63
  • 98
  • I have just tried that. In environement its set to jdk and when I write java -version in terminal it shows me: java version "1.7.0_79" OpenJDK Runtime Environment (IcedTea 2.5.6) (7u79-2.5.6-0ubuntu1.14.04.1) OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode) –  Oct 17 '15 at 10:05
  • See what you have in the JAVA_HOME variable. Also check if you have the tools.jar file in the JDK. – Henry Oct 17 '15 at 10:26
  • JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64/ I don't know if something is wrong, when java was installing it was set automatically –  Oct 18 '15 at 12:55