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

0
6 comments

Update on above, im using gradle

0

Hi Wesley,

Would it be possible for you to attach the following:

  • Your build.gradle file (can be uploaded privately to https://uploads.jetbrains.com/)
  • A screenshot of the File | Settings | Build, Execution, Deployment | Build Tools | Gradle dialog?
0

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

#Thu Mar 05 10:21:26 CET 2020
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

 

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?

0

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.

0

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

0

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):

0

Please sign in to leave a comment.