Error during SonarQube Scanner execution java.lang.UnsupportedClassVersionError

SonarQube 6.7.2
SonarJava Plugin 5.10.2

I am receiving the following error during a sonarqube scan.

ERROR: Error during SonarQube Scanner execution
java.lang.UnsupportedClassVersionError: DeliveryEndpointProtocol$EmailDeliveryRequest 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

Please advise what needs to be done to remedy this error.

I solved the problem by defining jdk10 in the jenkins job