Passing Java 11 to SonarQube using Gradle with Java 8

Now: SonarQube 8.0
Was: SonarQube 6.4
Java: All code compiling using Java 8

Error: SonarScanner will require Java 11+ to run starting in SonarQube 8.x

Question: How do I pass Java 11 location to SonarQube on the Gradle command line and not modify JAVA_HOME. i.e. is there a (sonar.) property available for this…?

1 Like

Hi David,

Did you have any luck with this? I’m running into a similar issue working with a project in Java 7 while Sonar is looking for Java 8. Is it possible to provide the path for Java 8 in the or build.gradle files?


Also wondering if there was any discovery around this.