1

I wanna enable Apex Tests in my workspace in VS Code, but I am unable to find out what is wrong.

Here are my possibilities:

enter image description here

Here is the setting that I am putting...

{"salesforcedx-vscode-apex.java.home": "/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java" }

enter image description here

But, all the time the error message is shown.

Here is the ouput of java version

(.venv) oalpb@itajuba:~$ java -version
openjdk version "1.8.0_292"
OpenJDK Runtime Environment (build 1.8.0_292-8u292-b10-0ubuntu1~20.04-b10)

How to fix it?

1 Answer 1

1

Apparently, in the image you are setting the key:value in the value field, you should just set /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java

SETTING EXAMPLE

If you open the json view, you will see the error more clearly

This is opened using the button at the top right

open settings in json

Java home should be in this format

json settings

1
  • 1
    Considering your screenshot I have put only "/usr/lib/jvm/java-8-openjdk-amd64" instead of "/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java" and it worked! Thank you! Commented Nov 3, 2021 at 14:44

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.