Scan java 8 code with sonarqube 2025.x

We are planning a sonarqube server version upgrade and looking for the version that we can go into.

  • We are currently using Community Edition Version 7.9.3 (build 33349)
  • We have projects in Java 8, 11, 17, and 21

We found that the sonar qube server versions like 9.9 LTA provided the supported scanners in its documentation: Prerequisites and overview
This document indicates that 9.9 LTA version no longer support scanning Java 8 code.

Is it the same for newer versions like 25.x?

We do not see similar information shown in the documentation other than the following note: Note: SonarQube Server is able to analyze any kind of Java source files regardless of the version of Java they comply with.

Hi,

To clarify, SonarQube does support analyzing Java 8 code, even in the latest 25.x releases. The note “SonarQube is able to analyze any kind of Java source files regardless of the version of Java they comply with.” means exactly that: the language version of the source code is not a limitation for analysis.

As confirmed in the Java analyzer documentation:

LTS 8, 11, 17, 21 and all intermediary versions up to Java 23 are fully supported.

What has changed is the Java version required to run the SonarScanner. Starting with recent versions, the scanner itself must run on JDK 17 or newer. This is mentioned in the “General requirements for your scanner environment”:

The requirement on the Java runtime environment refers only to the version of Java used by the scanner itself to run. It does not restrict the versions of Java that can be analyzed by the scanner.

Thanks Scott for the quick reply.

We will proceed our plan on upgrading to the latest version of sonar and will circle back with the results.