Migration from Java11 to Java17 scan failed

Hi community:
Our company has some old Java projects written in Java 8,previously, the Sonar Runner in Java 11 was able to scan and analyze normally.But after January 15 2024, Java11 was forcibly abandoned, causing these projects to be unable to be scanned。I tried to switch the runtime environment to Java 17, but encountered Maven compilation failure issue。

This is my GitHub Action workflow:

This is error message:

My these old projects are basically in a state of not being updated much, and the client does not agree to upgrade Java to version 17. Is there any other way to handle this situation?

Is there any way to switch Java back to Java 11 based on Sonarcloud and GitHub action

Hi,

Welcome to the community!

We’re really not fans of screenshots of text.

Keep in mind that you can still compile with Java 8 if you need to, as long as you analyze with Java 17.

 
HTH,
Ann

Hi ganncamp :
Thank you for seeing my topic,may I ask how to compile with Java 8, please share some examples or documents with me for github action, thank you!

Hi,

GH Actions isn’t really my area of expertise. You may also be interested in the target option for your compile.

 
HTH,
Ann

Hi Campbell,about “you can still compile with Java 8 if you need to, as long as you analyze with Java 17”, please share some examples or documents with me, i want to know how to use it and to solve my problem,thanks you!