How does IntelliJ decide how to import java.something
?
I’ve removed java 14 from my laptop, and IntelliJ still really seems to want to use it.
I see the following error when I try to rebuild the project in IntelliJ
Error:Cannot run program "/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/bin/java" (in directory "/Users/jimka/Library/Caches/JetBrains/IntelliJIdea2020.1/compile-server"): error=2, No such file or directory
And I see the following in the editor
However, when I run sbt test
from the shell, it compiles and runs correctly.
I’m pretty sure that there’s something IntelliJ is caching.
I’ve removed the ~/.ivy2
directory and also the ~/Library/Caches/JetBrains
directory,
but it doesn’t help. I’ve also searched for references to jdk, java, and jre using IntelliJ preferences,
and changed all references to java 14 which I can find.