Must-share information (formatted with Markdown):
- which versions are you using (SonarQube Server / Community Build, Scanner, Plugin, and any relevant extension) : 10.7
- how is SonarQube deployed: zip, Docker, Helm : zip
- what are you trying to achieve : upgrade sonarqube server version from 9.9 to 10.7
- what have you tried so far to achieve this : upgrade successful
Hi team,
we are seeing below error while scanning on our java project which is using declarative pipeline.
we tried providing the path to java home (/etc/alternatives/jre_17/bin)
Could not find ‘java’ executable in JAVA_HOME or PATH.
we are using sonar-scanner-cli docker image verison 6.2.1
-Dsonar.java.jdkHome=/etc/alternatives/jre_17/bin/ - is been passed to the scan stage as sonar properties.
env vars on sonar-scanner env:
bash-4.4$ env | grep -i path
NODE_PATH=/opt/node-v20.10.0-linux-x64/lib/node_modules
PATH=/opt/sonar-scanner/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/sbin:/opt/node-v20.10.0-linux-x64/bin:/etc/alternatives/jre_17/bin
bash-4.4$ env | grep -i java
JAVA_HOME=/etc/alternatives/jre_17/bin
java version:
bash-4.4$ java --version
openjdk 17.0.13 2024-10-15 LTS
OpenJDK Runtime Environment (Red_Hat-17.0.13.0.11-1) (build 17.0.13+11-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-17.0.13.0.11-1) (build 17.0.13+11-LTS, mixed mode, sharing)
bash-4.4$
please assist.
Thanks!
Dev