I am using jenv to set the java home. It works fine and points to the correct JAVA_HOME when I do echo $JAVA_HOME
.
My question is how do we set Intellij to get the SDK pointed by JAVA_HOME without having to go through the project SDK route.
Output of:
echo $JAVA_HOME
/Users/jetfire/.jenv/versions/ibm64-15.0.1
java -version
openjdk version "15.0.1" 2020-10-20
OpenJDK Runtime Environment AdoptOpenJDK (build 15.0.1+9)
Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.23.0, JRE 15 Mac OS X amd64-64-Bit Compressed References 20201024_81 (JIT enabled, AOT enabled)
OpenJ9 - 0394ef754
OMR - 582366ae5
JCL - ad583de3b5 based on jdk-15.0.1+9)
I feel the closest related answer is from here https://stackoverflow.com/a/33559424
However I don't think I should be setting java_home as it is already setup by jenv.
Reached out to the IntelliJ team and it appears that there is an open request for this feature. Currently it is not possible to so. Reference: