Intellij (2020.2) installing old jdk versions
Answered
I am using jdk V15 installed manually via sdkman.
However intellij keeps installing its own versions of jdk13 and jdk14, i dont know why, i never asked it to and i cannot find a setting to disable this.
~/.jdks/azul-13.0.5
~/.jdks/liberica-14.0.2
I do not regularly use multiple versions of the jdk, whichever is installed is the one it should use.
I do not want intellij installing jdk's from unknown sources. How can i disable this?
thanks
Please sign in to leave a comment.
Update on above, im using gradle
Hi Wesley,
Would it be possible for you to attach the following:
Thanks for your response
So this shows its inferring? jdk 14 from the wrapper, but as far as I can see the wrapper doesnt define any jdk version.
If i change this to jdk15 it changes back.
gradle-wrapper.properties
https://www.jetbrains.com/help/idea/gradle-jvm-selection.html#jdk_existing_project
This page indicates that it is checking gradle for a version first, i assume gradle 'prefers' jdk14 and so its using that, but jdk14 is only an option because intellij is installing it. I believe it should be checking the JAVA_HOME env var which is correctly set to V15
How can i tell intellij not to install jdk's?
IntelliJ IDEA is capable of detecting JDKs already installed on your machine, but it shouldn't be adding them to its configuration automatically.
Check the File | Project Structure | SDKs page: are the JDKs 13 and 14 listed there?
Try deleting them, hitting 'Apply' and restarting the IDE using the File | Invalidate Caches & Restart option.
Thanks for your response
I removed 14 from File| Project Structure | SDKs and invalidated and for a short term it was ok
however now again i see the following messages and 14 is back
So it is caused by Gradle settings after all.
You can explicitly tell the Gradle JVM to use the JDK defined in JAVA_HOME instead (just expand the drop-down):