Could not find 'java' executable in JAVA_HOME

Turns out the error message is misleading. The real problem is the java executable that is included in sonar-scanner-#.#.#.####-linux/jre/bin/ needs execute permissions set. After running

chmod 755 .../sonar-scanner-#.#.#.####-linux/jre/bin/java

sonar-scanner was able to scan.

4 Likes