SonarScanner will require Java 11 to run, starting in SonarQube 9.x

Hi All ,

We are using SonarScanner( for maven for running analysis on Sonarqube Enterprise Edition
Below are the logs which states the java source & jdkHome with version as 11:
[INFO] 08:58:41.041 Configured Java source version ( 11
[INFO] 08:58:41.051 JavaClasspath initialization
[DEBUG] 08:58:41.052 Property ‘’ set with: /var/jenkins_home/jdk/openjdk11.0.2/
[DEBUG] 08:58:41.057 Property ‘’ resolved with:

But still the logs also shows warning as “SonarScanner will require Java 11 to run, starting in SonarQube 9.x”

Can anyone guide what additional properties needs to set in settings.xml to eliminate this warning?

Hi @Ruchi ,

Welcome to SonarSource Community! :sonarsource:

I could not replicate your issue with the same setup (SQ EE 8.8, sonar scanner for maven and setting the Can you please provide the entirety of your Maven debug logs? It might be easier to zip it up or you can private message me the file like so: create a new topic and click on the + sign to create a new message:


Hi @Joe

Thanks for your inputs.PFA the log files.

common-code-1.2.8.txt (602.4 KB)


@Ruchi : Thank you for providing the logs quickly. I was able to replicate most of what you are seeing from your own logs.

From your logs, here are the relevant sections where Java version is referenced, just as you mentioned before:

[common-code-1.2.8] $ /var/jenkins_home/jdk/jdk1.8.0_202//bin/java -cp /var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/maven35-agent-1.13.jar:/var/jenkins_home/maven/apache-maven-3.6.3/boot/plexus-classworlds-2.6.0.jar:/var/jenkins_home/maven/apache-maven-3.6.3/conf/logging jenkins.maven3.agent.Maven35Main /var/jenkins_home/maven/apache-maven-3.6.3/ /var/jenkins_home/war/WEB-INF/lib/remoting-4.7.jar /var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/maven35-interceptor-1.13.jar /var/jenkins_home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.13.jar 34223
<===[JENKINS REMOTING CAPACITY]===>���channel started
Executing Maven:  -B -f /var/jenkins_home/workspace/common-code-1.2.8/pom.xml clean install sonar:sonar -U -X -Dmaven.javadoc.skip=true -Dmaven.test.skip=true
e[1mApache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)e[m
Maven home: /var/jenkins_home/maven/apache-maven-3.6.3
Java version: 1.8.0_202, vendor: Oracle Corporation, runtime: /var/jenkins_home/jdk/jdk1.8.0_202/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.18.0-240.10.1.el8_3.x86_64", arch: "amd64", family: "unix"
[INFO] --- sonar-maven-plugin: (default-cli) @ common-code ---
[INFO] 12:59:07.105 SonarQube version: 8.8.0
[WARNING] 12:59:07.510 SonarScanner will require Java 11 to run, starting in SonarQube 9.x
[INFO] 12:59:16.177 Configured Java source version ( 11
[INFO] 12:59:16.187 JavaClasspath initialization
[DEBUG] 12:59:16.188 Property '' set with: /var/jenkins_home/jdk/openjdk11.0.2/
[DEBUG] 12:59:16.194 Property '' resolved with:

Note that Apache Maven is using your JDK_HOME environment variable to determine which Java to use since the Sonar Scanner for Maven reads from what Maven provides it. So, this means you can set JDK_HOME right before you call mvn command or set it before you trigger the build.

I suggest doing it inline to keep it as close to mvn command as possible like so:

JAVA_HOME="/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home" mvn clean install sonar:sonar ...

Also, you should ensure you are pointing at JDK, not JRE.