I'm trying to set the SDK to my project on IntelliJ and when I select the path to the SDK I get this error.
I'm using IntelliJ-IDEA as IDE
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 10:51:28-0300) Maven home: /usr/local/apache-maven-3.0.5 Java version: 1.7.0_80, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-7-oracle/jre Default locale: es_CL, platform encoding: UTF-8 OS name: "linux", version: "4.4.0-21-generic", arch: "amd64", family: "unix"
java -version
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
javac -version
javac 1.7.0_80
echo $JAVA_HOME
/usr/lib/jvm/java-7-oracle
Any help?
You need to install the Java SE Development Kit (JDK) on your computer in order to compile Java programs (and by extension, Android apps). You can download and install the JDK from the Oracle website .
Alternatively, if you're using a Debian-based linux distro (like Ubuntu), you can use OpenJDK:
sudo apt-get install openjdk-7-jdk
You need to define path for JDK in File -> Project Structure -> SDK Location -> JDK Location. Use this picture as a reference.
For your info, JDK stands for Java Development Kit and can be downloaded from Download JDK
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.