I have installed:-

Visual Studio Code Version 1.80.1 on Windows 11 "C:\Program Files\Java" with directories: jdk-17.0.5 jdk-20 and jre-1.8

VS Terminal Command: sfdx update completed successfully.

sfdx plugins install @salesforce/sfdx-scanner Success: @salesforce/sfdx-scanner... installed v3.14.0

VS Terminal Command: sfdx scanner:run --format=csv --outfile=CodeAnalyserGeneral.csv --target="./" --category="Security" resulting in Error:

"Warning: Deprecated config name: apiVersion. Please use org-api-version instead. (Use node --trace-warnings ... to show where the warning was created) ERROR running scanner:run: The Java Home with directories invalid: C:\Program Files\Java\jre1.8.0_281. Error code: . Please verify that Java 1.8 or later is installed on your machine and try again. If the problem persists, please manually add a 'javaHome' property to your Config.json file, referencing your Java home directory."

Question: Where is Config.json file (I am unable to find it.) and how to "reference your Java home directory" if found.

I would appreciate guidance, thank you

  • is java 1.8 or later installed on your machine?
    – Nick C
    Commented Aug 8, 2023 at 6:46
  • Thank you for the response Nick.
    – Stoicorum
    Commented Aug 12, 2023 at 0:45

2 Answers 2


The file it's referring to is the Config.json file for the code scanner in your user settings. For Windows it will be in c:/users/username/.sfdx-scanner

  • Thank you Maz 44. I had worked it out.
    – Stoicorum
    Commented Dec 1, 2023 at 5:31

The error message "Config.json" is a little misleading.
Following the link below for Java install was clear and successful. https://developer.salesforce.com/docs/atlas.en-us.salesforce_developer_environment_tipsheet.meta/salesforce_developer_environment_tipsheet/salesforce_developer_environment_overview.htm

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .