Downloading Metals (Vscode Scala extension) failed with the following: spawn C:\Program Files (x86)\Java\jdk1.8.0_144\bin\bin\java ENOENT

Viewed 818

I'm trying to run a Scala program on the vscode. I tried downloading Scala (Metals) Extension but it gives me the following error.

Failed to download Metals, make sure you have an internet connection and the Java Home 'C:\Program Files (x86)\Java\jdk1.8.0_144\bin' is valid. You can configure the Java Home in the settings. See https://scalameta.org/metals/docs/editors/vscode.html#http-proxy for instructions if you are using an HTTP proxy.

I'm not using any proxy. I checked my environment variables and the JAVA_HOME system variable is set to "C:\Program Files (x86)\Java\jdk1.8.0_144\bin"

I have Java 8 installed on my machine but not on VSCODE. Can that be a problem?

1 Answers

@hughj is correct. I had the same problem and reviewing/updating my java install and configuration allowed the Metals extension to download.

Related