Trouble with JRE path - SonarLint extension with VSCode on MacOS

Hi guys,

Really having issues with getting SonarLint to run within VSCode (Version 1.23.1) in macOS (High Sierra Version 10.13.4).

After I installed the SonarLint extension from within VSCode and opened a JS file, I see the following error:
“Couldn’t start client SonarLint Language Server”
“Java 8 is required to run. Please download and install a JRE 8”

Typing “java --version” on my terminal returns the following version of JRE installed:
java 10.0.1 2018-04-17
Java™ SE Runtime Environment 18.3 (build 10.0.1+10)
Java HotSpot™ 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)

I have tried setting the following values for the variable “” in the VSCode user settings but none of them have worked so far:

  • “/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/”
  • “/Library/Java/Home”
  • “/Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/”
  • “/Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home/”

Am I doing something wrong here? In general, I can’t install Java Version 8 since 10 is already installed (unless I uninstall 10 and try installing 8).

Has anyone been able to use SonarLint with VSCode in MacOS at all?

Unfortunately SonarLint for VS Code doesn’t work with Java 10. You will need to downgrade your java to version 8 or 9.

Thanks Tibor! I uninstalled java from the Mac and reinstalled JRE version 8 - SonarLint is running on my Mac with VSCode now.

Also, for other people facing the same issue, I also had to update the following user setting in visual studio:

"": "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home",

FYI, here is a ticket to support Java 10

1 Like