Run Code Analysis in Azure DevOps failing

We wanted to add SonarQube to our azure DevOps pipeline. It is a angular project and the Run Code analysis version is 5.7.0. The run code analysis task fails with the error in the image. The order of pipeline is,
npm install
Prepare analysis on SonarQube
npm run build dev2
Run Code Analysis
Publish Quality Gate Result

I have followed Azure DevOps Integration | SonarQube Docs and the Typescript option.


It looks like you’re trying to run analysis with an old version of Java. You’ll need to upgrade to Java 11.


Thanks for the help. Can you tell me how I can install java 11 in Azure.


Sorry, I don’t have any Azure expertise.