SonarQube Scanners and Java 11

Hello All, we are currently running SonarQube 8.9 under Java 11 on the SonarQube server, but our build server where the sonarscanner is at is under Java 8 (note: we have some apps that can only run under Java 8). We are using an Azure DevOps sonarscanner with self hosted agents. In order to use SonarQube 9.0+, do we just need to install Java 11 (and keep Java 8 present) on the sonarscanner server and then change our build pipeline to run Java 11 by default (or override the JAVA_HOME variable just before running)? Is there anything else that needs to be done?

  1. install Java 11 (and keep Java 8 present)
  2. change Java 11 to default (or override JAVA_Home variable right before scanner call)

Please advise and thanks…

Hi @bufbooth ,

You are correct.: overriding JAVA_HOME just before the Sonar scanner analysis is all you need to do, so you will need both Java 8 and Java 11. That’s all that is needed.

Please review Moving Analysis to Java 11 | SonarQube Docs for more information.