JAVA_HOME on Visual Studio 2022 environment

Robb's Avatar


08 Dec, 2021 01:12 PM


I'm migrating my appveyor script to run with the VS2022 image (was previously running fine with VS2017).
I'm tripping on JAVA_HOME which is needed to run SonarScanner :

  • My appveyor.yml script : SET JAVA_HOME=C:\\Progra~1\\Java\\jdk11
  • The actual result : ERROR: JAVA_HOME exists but does not point to a valid Java home folder. No "\bin\java.exe" file can be found there

Is there something I could to to fix that ?


  1. 1 Posted by Robb on 08 Dec, 2021 01:20 PM

    Robb's Avatar

    Switching to JDK16 did the trick.

    I've been confused by where JDK11 seems to be available with the VS2022 image.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac