Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file

Got this error:
Error during SonarScanner execution
java.lang.UnsupportedClassVersionError: org/sonar/batch/bootstrapper/EnvironmentInformation has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

I am brand new to SonarQube, I got this while I am trying to set up a Azure CI pipeline with Sonarqube My scenario is working (or not) with a self hosted agent first I am trying to analyze solution located on the agent against my company sonarqube server. I have tried all the blogpost and answers here about settting up the java_home variable and versions of java skd java jre so I am not sure if this is something else or I am setting any of this things wrong. Hope you can help me

Hi,

Welcome to the community!

This is Java’s painfully obscure way of saying the version of the Java runtime doesn’t match the version of the executable. I use this SO question as my cheat sheet.

Based on that, you’re running Java 8, and you need to be running Java 11.

 
HTH,
Ann