Search code examples
javaintellij-ideasdkman

JDKs installed with SDKMAN are not selectable in the IntelliJ IDE


What steps will reproduce the issue?

  • Install SDKMAN (https://sdkman.io) commandline tool
  • Install one or more JDK using sdkman eg.: sdk install java 8.0.232-zulu
  • Open a project in IntelliJ IDEA
  • Navigate to the "Set home directory for JDK" window: File » Project Structure » SDKs » + (button) » JDK
  • Select "Show hidden files and directories"
  • Navigate to ~/.sdkman/candidates/java
  • The installed JDK versions should be shown here - but the folders cannot be opened

What is the expected result?

The installed JDK should be selectable

What happens instead?

The folders containing the JDKs are not displayed in the browser (image #3) I need to switch back to JDK 8 and currently I can only use the IDEs built in JDK11 (cannot select either the 11 or 8 JDK versions installed through SDKMAN)

Environment

OS: Linux Mint IntelliJ IDEA 2019.3 (Community Edition) Build #IC-193.5233.102, built on November 28, 2019

Screenshots and log can be found in the Jetbrains issue tracker: https://youtrack.jetbrains.com/issue/IDEA-228394


Solution

  • Use File > Invalidate Caches / Restart option which should invalidate local caches. Hopefully it's a glitch in the dialog cache.