Getting error for sonarcloud task in ADO with java 17

I tried that solution but still getting the same error,

this is the way I provided the env variable in the sonarcloud task of pipeline yaml

  • task: SonarSource.sonarcloud.14d9cde6-c1da-4d55-aa01-2965cd301255.SonarCloudPrepare@1
    displayName: ‘Prepare analysis on SonarCloud’
    inputs:
    SonarCloud: “sonarcloud”
    organization: "***"
    scannerMode: ‘CLI’
    configMode: manual
    cliProjectKey: “"
    cliProjectName: "
    ***”
    SONAR_SCANNER_OPTS: “–add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED”
    extraProperties: |
    sonar.exclusions=spec/

    -X

and also tried the same variable under analyze task also

  • task: SonarSource.sonarcloud.ce096e50-6155-4de8-8800-4221aaeed4a1.SonarCloudAnalyze@1
    displayName: ‘Run Code Analysis’
    SONAR_SCANNER_OPTS: “–add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED”