Hi Collin,
I was able to fix the java path , but sonar is passing when I choose 17 and 21 JDK versions and it is failing with below error when i choose 8 and 11 JDK versions,
For 11:
#[error]Error: LinkageError occurred while loading main class org.sonarsource.scanner.cli.Main
##[debug]Processed: ##vso[task.logissue type=error;]Error: LinkageError occurred while loading main class org.sonarsource.scanner.cli.Main
Error: LinkageError occurred while loading main class org.sonarsource.scanner.cli.Main
##[error]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 55.0
##[debug]Processed: ##vso[task.logissue type=error;]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 55.0
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 55.0
##[error]The SonarScanner did not complete successfully
##[debug]Processed: ##vso[task.logissue type=error;]The SonarScanner did not complete successfully
The SonarScanner did not complete successfully
##[error]01:57:17.867 Post-processing failed. Exit code: 1
##[debug]Processed: ##vso[task.logissue type=error;]01:57:17.867 Post-processing failed. Exit code: 1
01:57:17.867 Post-processing failed. Exit code: 1
##[debug]Exit code 1 received from tool 'C:\azp\agent\_work\_tasks\SonarQubePrepare_15b
For 8:
C:\azp\agent\_work\_temp\ContainerAdministrator_C91430E07ED4_2025-07-08_02_02_16\In\C91430E07ED4\ContainerAdministrator_C91430E07ED4_2025-07-08.02_02_16.coverage
Unique coverage files: count=1
C:\azp\agent\_work\_temp\768a38ba-7e78-4b97-af74-9018004db19a\ContainerAdministrator_C91430E07ED4_2025-07-08.02_02_16.coverage
Converting coverage file 'C:\azp\agent\_work\_temp\768a38ba-7e78-4b97-af74-9018004db19a\ContainerAdministrator_C91430E07ED4_2025-07-08.02_02_16.coverage' to 'C:\azp\agent\_work\_temp\768a38ba-7e78-4b97-af74-9018004db19a\ContainerAdministrator_C91430E07ED4_2025-07-08.02_02_16.coveragexml'.
Coverage report conversion completed successfully.
The TFS Processor has finished
Calling the SonarScanner CLI...
##[debug]Agent environment resources - Disk: C:\ Available 125241.50 MB out of 129918.98 MB, Memory: Used 39501.00 MB out of 65534.00 MB, CPU: Usage 22.00%
##[error]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 52.0
##[debug]Processed: ##vso[task.logissue type=error;]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 52.0
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 52.0
##[error]at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)