Sonarqube 8.9 Supported Java Version
SonarQube 8.9 does not support running the server on Java 17; this capability was only introduced in later versions (starting with 9.x).
SonarQube 8.9, a former Long-Term Support (LTS) release, requires to run the server. While the server environment is strictly tied to Java 11, the requirements for scanners and the code being analyzed offer more flexibility. SonarQube 8.9 Server Requirements sonarqube 8.9 supported java version
sudo yum install java-11-openjdk-devel -y SonarQube 8
java.lang.UnsupportedClassVersionError: com/sonar/scanner/scanner has been compiled by a more recent version of Java Runtime You can specify the version of the source
At the time SonarQube 8.9 was released and actively supported, Java 17 was not yet the standard. While later patches of SonarQube 9.x added full support for Java 17, running SonarQube 8.9 on Java 17 is generally and was not officially certified at the time of its release. Sticking to Java 11 is the safest and most stable path for the 8.9 LTS server.
You can specify the version of the source code using the sonar.java.source property (e.g., sonar.java.source=1.8 or sonar.java.source=11 ). This ensures that SonarQube applies rules relevant to that specific Java version and avoids false positives for newer language features.