JAVA version issue when using SonarCloud

Hi Team,

I have recently integrated my projects (private) to SonarCloud and I am facing issues with running analysis on VB .NET webforms application. We are using Azure DevOps and build agent was setup on a On-premise server to build the application. Pre Analysis and Build are successful but getting JAVA version error when running the analysis. We have installed JDK 11 on the on-premise server where the build agent is running but still getting JAVA version error.

Do we need to install Sonar Scanner on the server?
As we are using SonarCloud, not expecting a Sonar scanner required to be installed on any of our servers. Please advise. Let me know if you need any further information.

Hi @vtangudu and welcome to the community.

If you’re are self-hosting your build agent, make sure you have the “java” capability setup in the configuration of that agent :

HTH,
Mickaël

Hi Michael,

We have that added already but still we are getting same error. Find below for the error details.

ERROR: Error during SonarScanner execution

##[error]ERROR:

The version of Java (1.8.0_131) you have used to run this analysis is deprecated and we stopped accepting it.

Please update to at least Java 11. You can find more information here: https://sonarcloud.io/documentation/upcoming/

ERROR:

The version of Java (1.8.0_131) you have used to run this analysis is deprecated and we stopped accepting it.

Please update to at least Java 11. You can find more information here: https://sonarcloud.io/documentation/upcoming/

ERROR:

##[error]The SonarScanner did not complete successfully

The SonarScanner did not complete successfully

##[error]14:53:29.863 Post-processing failed. Exit code: 1

Hi @vtangudu

So you should upgrade your JDK version i would say.

Mickaël

It is 11 already. Do you recommend to upgrade to later version?

If it’s 11 already, you should update your JAVA_HOME env variable to pick the path to your java 11 installation.