No Find the JDK in Ubuntu 14.04

4

I have a problem trying to install android Studio on Ubuntu 14.04. I get the following error:

  

ERROR: Cannont start Android Studio
  No JDK found. Please validate either STUDIO_JDK, JDK_HOME or JAVA_HOME environment variable points to valid JDK installation.

I was already investigating and I only found a solution in Windows in which environment variables have to be created, but in ubuntu I can not find anything, and it is assumed that I already have the JDK installed.

    
asked by Kevin Ramirez 26.12.2015 в 04:25
source

1 answer

4

You can set your variable JAVA_HOME in /etc/profile but preferably save JAVA_HOME or any system variable in /etc/environment .

Open /etc/environment in nano or gedit and add the following:

JAVA_HOME="/usr/lib/jvm/jdk" (The route may be different depending on your machine)

Now run the following command to load the variables:

source /etc/environment

Then check the contents of your variable with the following command:

echo $JAVA_HOME

If the route is printed on the screen, you have done it correctly and the same applies to the other variables.

Reference in English here .

    
answered by 26.12.2015 / 10:15
source