I was having the same problem (latest macOS) and I have OpenJDKs 8-16 installed currently.
sonarlint.ls.javaHome entry mentioned above works:
FWIW, I use jEnv to manage Java versions. My global JDK is set to Java 8 and my project JDK is set to Java 11 (at least for the current project). I had also previously configured VSC to use JDK 11 via the
java.home key in
settings.json, but this was ignored.
I suspect the
find-java-home NPM package was finding JDK 8. Perhaps there is a better way to find a specific/target JDK so you can specify needing JDK 11+ instead of finding an incorrect version?