From Jenkins I’ve compiled with a Java project using Maven and JDK 10 and, then, I’m trying to launch a SonarQube analysis using SonarQube Scanner and specifying, in Jenkins, this same version of Java. When launching the analysis, I’m obtaining this error:
Could not find class com.everis.edms.core.model.Document, due to: java.lang.UnsupportedClassVersionError: com/everis/edms/core/model/Document has been compiled by a more recent version of the Java Runtime (class file version 54.0), this version of the Java Runtime only recognizes class file versions up to 52.0
My environment is the following:
- SonarQube Server: 6.7.1
- SonarQube scanner version: 3.0.3
Is my version of SonarQube compatible with Java 10? Why, if I’m specifying the scanner to be launched with a specific version of Java (10), am I obtaining this error?