I'm using jEnv to manage my Java environment. I tried to launch Android Studio but it fails with the following error message (with a fresh download - just to be sure):
'tools.jar' seems to be not in Studio classpath.
Please ensure JAVA_HOME points to JDK rather than JRE.
I used the export plugin so that jEnv sets my JAVA_HOME environment variable for me.
Here's how it looks in my terminal:
jenv global
> 1.8.0.65
java -version
> java version "1.8.0_65"
> Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
> Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)
javac -version
> javac 1.8.0_65
echo $JAVA_HOME
> /Users/****/.jenv/versions/1.8.0.65
ls /Users/****/.jenv/versions/1.8.0.65/lib/
> ant-javafx.jar ir.idl missioncontrol sa-jdi.jar
> ct.sym javafx-mx.jar orb.idl tools.jar
> dt.jar jconsole.jar packager.jar visualvm
So I can see the tools.jar, that's why I don't get why Android Studio can't launch.
I'm on Mac OS X El Capitan 10.11.3.
By the way I read the top voted answer of tools.jar seems to be not in Android Studio classpath on Windows 8 but it said that you should copy the jar, which makes me think a really ugly way to fix the problem (I haven't tried it yet but I hope this not the only solution).
Has anyone experienced this issue and knows how I can fix it ?