I have followed the steps suggested on "Java runtime could not be located" when starting VSCode with the Salesforce Extensions.

But now I still getting the following error "

Code Editor for Visual Studio Code (Extension) Java 8 is required to run. Download and install it from https://java.com/en/download/."

The version of Java installed is:

java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
Version of Visual Studio Code: 1.27.1
Apex Code Editor for Visual Studio Code: 43.15.0

Contents of salesforcedx-vscode-apex.java.home:

    "salesforcedx-vscode-apex.java.home": "/Program Files/Java/jdk1.8.0_181/bin"

Anyone have any ideas on what's going on? I have also tried setting the environment path, but this has failed to make a difference.

  • This has worked for me -- salesforcedx-vscode-apex.java.home":"C:\\Program Files (x86)\\Java\\jre1.8.0_161". Can you try using this format? To me the current format you have looks to be mac oriented. – Jayant Das Sep 13 '18 at 16:23
  • Hi, I have tried the following path: "C:\\Program Files\\Java\\jdk1.8.0_181\\bin". It's still not detecting Java 8. I noticed that you are using the 32bit version of the JRE, so I have tried to change the path to point to the JRE directory as follows, "C:\\Program Files\\Java\\jdk1.8.0_181\\jre\\bin" again no luck. – JoelM Sep 14 '18 at 10:35

Fixed it!!! Used the following: { "salesforcedx-vscode-apex.java.home": "C:\Program Files\Java\jdk1.8.0_181\jre" }

  • With jdk1.8.0_192, this does not work. Using single backslashes causes VS Code to interpret the following characters as escaped, so don't know if a previous version didn't, but even: { "salesforcedx-vscode-apex.java.home": "C:\\Program Files\\Java\\jdk1.8.0_191\\jre" } still results in multiple "command not found" issues – trebleCode Jan 10 '19 at 21:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.