Could not find 'java' executable in JAVA_HOME or PATH in sonarsource/sonar-scanner-cli:latest image

Must-share information (formatted with Markdown):

  • which versions are you using

  • how is SonarQube deployed: zip, Docker, Helm
    Via sonarcloud

  • what are you trying to achieve
    I’m trying to run a scan, which worked (and still works) with v4.7, but not with 4.8. I can see in the latest commits there were changes made to the JAVA_HOME variable.

  • what have you tried so far to achieve this
    Revert back to 4.7

This is the error message I’m getting, when I try to run the scanner
`` Status: Downloaded newer image for sonarsource/sonar-scanner-cli:latest Could not find 'java' executable in JAVA_HOME or PATH.


Welcome to the community!

You’ve filed this in the SonarQube category, but say you’re using SonarCloud. Could you clarify which it is?

Are you using the vanilla SonarScanner for CLI, or the Docker image for it?


Sonarcloud it is. Sorry I had some troubles identifying the right category.


Thanks for helping me correct the category. Now how are you using the scanner? Are you downloading it directly or using a Docker image of it?