Trying to invoke Sonar-Scanner on Ubuntu 20.03LTS while running from a TeamCity agent, and the Sonar-Scanner script doesnt pick up the embedded jre. Downloaded sonar-scanner-cli-184.108.40.2062-linux, and the Sonar-Scanner set use_embedded_jre=true correctly. However keep getting:
Could not find 'java' executable in JAVA_HOME or PATH.
I’ve tried to download the sonar-scanner, unzipping it to the home directory and call it from TeamCity - this actually works. But when including sonar-scanner in the git repo and letting the TeamCity agent check it out, it doesnt.
Any advice on how to troubleshoot this?