I'm trying to setup an SDK for intellij idea and I can't find the home for jdk as the error put it.
In the terminal this is what I get
$ java -version
openjdk version "9-internal"
OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src)
OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode)
I tried to run
$ whereis java
and none of the paths are valid
then I found the jvm folder in usr/lib/jvm none of those worked either.
this is the output of
$ ls -lh /usr/lib/jvm/
I just ran another command
$ update-alternatives --list java
Output was
/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
/usr/lib/jvm/java-9-openjdk-amd64/bin/java
In idea, the sdk selector will only go upto the /bin but the internal files don't appear and in the file explorer I can see the java file but clicking it does nothing nor can I directly copy it's path as I get the error:
"Specified path cannot be found"
Also ran
$ sudo update-alternatives --display java
Output
java - auto mode
link best version is /usr/lib/jvm/java-9-openjdk-amd64/bin/java
link currently points to /usr/lib/jvm/java-9-openjdk-amd64/bin/java
link java is /usr/bin/java
slave java.1.gz is /usr/share/man/man1/java.1.gz
/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java - priority 1081
slave java.1.gz: /usr/lib/jvm/java-8-openjdk-amd64/jre/man/man1/java.1.gz
/usr/lib/jvm/java-9-openjdk-amd64/bin/java - priority 1091
slave java.1.gz: /usr/lib/jvm/java-9-openjdk-amd64/man/man1/java.1.gz

