Configuring the JDK in Android Studio

-1

I need to configure the JDK path in Android Studio via terminal without root access to a script. The computer has JDK / JRE 7, I tried to change the value of some variables: PATH, JAVA_HOME, JDK_HOME, STUDIO_JDK, ....

In the terminal jdk 8 works by changing the value of the PATH, but when I open Android Studio it only recognizes the JRE.

GraphicallyviaProjectStructureIcanchangetheJDK,butIneedittobeviaCLI. Anyone know?

    
asked by anonymous 18.09.2016 / 01:44

1 answer

0

Android Studio uses the variable JAVA_HOME to get the Java version. You need to use the following command telling your Java location:

export set JAVA_HOME=/usr/lib/jvm/java-8-oracle/

This default-java path does not contain Java 8, you will need to install it. For installation, follow the manual .

    
18.09.2016 / 14:35