SonarQube not able to configure in Azure DevOps pipeline

I have .NET application and we have sonarqube server configuration with valid project.
I am trying to configure in DevOps pipeline but I am getting below error.

##[error]No agent found in pool which satisfies the following demand: java. All demands: msbuild, visualstudio, java, Agent.Version -gtVersion 2.144.0

Running this on self-hosted agent and it has all required softwares including java.
I am able to run my application without sonarqube run code analysis task.

Please help

You’ll want to dig into your agent capabilities to understand what isn’t being satisfied.

thanks for reply.
is this java version fine?

java version “18.0.1.1” 2022-04-22
Java™ SE Runtime Environment (build 18.0.1.1+2-6)
Java HotSpot™ 64-Bit Server VM (build 18.0.1.1+2-6, mixed mode, sharing)

I got it… added capability for java then it works fine… thanks much