What to Do with a java.lang.UnsupportedClassVersionError?

After updating the SonarQube tasks in our Azure DevOps pipeline, we got this error message:

java.lang.UnsupportedClassVersionError: org/sonarsource/scanner/cli/Main has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 57.0

Should you run into such an error and not remember which class file version belongs to which JDK version, you should go to javaalmanac.io/bytecode/versions/ . This site offers a nice list that matches JDK versions to class file versions:

The list shows that JDK 17 creates class file version 61.

As soon as you know what version you need, you can go to Adoptium.net of the Eclipse Foundation and download it.

I hope this helps you to find the right JDK version.