26

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

Péter Veres
  • 955
  • 1
  • 10
  • 25
  • There is refresh button in any file selection dialog (last point in your steps), did you press it? IntelliJ caches filesystem and in some menus you have to manually refresh it. – Karol Dowbecki Dec 04 '19 at 16:10
  • yest I did that before reporting the bug, I also restarted my system after uninstalling and reinstalling both JDKs – Péter Veres Dec 04 '19 at 16:14
  • 1
    Have you tried File > Invalidate Caches / Restart? – Karol Dowbecki Dec 04 '19 at 16:14
  • ahhh, thank you, it has solved the problem. I always forget that this is a magic spell for IntelliJ.. Could you write an "answer" so that I can mark it as the solution? – Péter Veres Dec 04 '19 at 16:20

3 Answers3

12

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

Karol Dowbecki
  • 43,645
  • 9
  • 78
  • 111
3

For me both of of the below helped to resolved.

  1. Invalidate cache (File > Invalidate Caches / Restart)
  2. Update the IntelliJ version to 2021.x (This would solve much of ur problem!)
Nilotpal
  • 3,237
  • 4
  • 34
  • 56
0

If Planning to use Java 14 (Preview - Record, patterns, text blocks), make to have switched to IntelliJ 2020.1 update. then, you can press (cmd + ;) for mac to open project/module settings and select Java 14 JDK and language level Java 14 (Preview - Record, patterns, text blocks)

Tarnished-Coder
  • 318
  • 2
  • 7