Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 506
Péter Veres Avatar asked Dec 04 '19 16:12

Péter Veres


People also ask

Where is SDKMAN installed?

The installed SDKs are stored in the SDKMAN! directory which defaults to ~/. sdkman/candidates. Therefore, the currently selected version of Java will also be available as current in that directory.

How do I change the execution environment in IntelliJ?

Switch the Java runtime used to run IntelliJ IDEAFrom the main menu, select Help | Find Action or press Ctrl+Shift+A . Find and select the Choose Boot Java Runtime for the IDE action. Select the desired runtime and click OK.


1 Answers

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

like image 113
Karol Dowbecki Avatar answered Oct 16 '22 00:10

Karol Dowbecki