# Older default java version used with Azure devops Hosted agent

**URL:** <https://community.sonarsource.com/t/older-default-java-version-used-with-azure-devops-hosted-agent/25243>\
**Category:** SonarQube Cloud\
**Created:** [May 26, 2020, 1:25pm UTC](https://community.sonarsource.com/t/older-default-java-version-used-with-azure-devops-hosted-agent/25243 "2020-05-26T13:25:44Z")\
**Posts on this page:** 7\
**Page:** 2

<div class="post-metadata">

**Author:** ![Phil\_McCloghry-Laing](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/phil_mccloghry-laing/32/8857_2.png) [@Phil\_McCloghry-Laing](https://community.sonarsource.com/u/Phil_McCloghry-Laing)\
**Post date:** [May 29, 2020, 1:00am UTC](https://community.sonarsource.com/t/older-default-java-version-used-with-azure-devops-hosted-agent/25243/24 "2020-05-29T01:00:46Z")

</div>

A quick fix to this would be to post and resolve the comment on the PR - that way it doesn’t prevent auto-completion of builds.

I agree with @gregpakes that the task should search for the best version of Java - there are environment variables to enable that, i.e. JAVA\_HOME\_11\_X64.

---

<div class="post-metadata">

**Author:** ![jrstrayhorn](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@jrstrayhorn](https://community.sonarsource.com/u/jrstrayhorn)\
**Post date:** [June 1, 2020, 2:11pm UTC](https://community.sonarsource.com/t/older-default-java-version-used-with-azure-devops-hosted-agent/25243/25 "2020-06-01T14:11:19Z")

</div>

We are experiencing the same PR comments as well. Posting here @mickaelcaro to follow progress on improvements to this based on your last comment.

Having the SonarCloud task be able to identify where required Java version is installed would be ideal as our build agent already has Java 11 on it just not being used. (using MS-hosted Windows Server 2016 w/ VS 2017)

---

<div class="post-metadata">

**Author:** ![mickaelcaro](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mickaelcaro/32/4147_2.png) [@mickaelcaro](https://community.sonarsource.com/u/mickaelcaro)\
**Post date:** [June 2, 2020, 10:05am UTC](https://community.sonarsource.com/t/older-default-java-version-used-with-azure-devops-hosted-agent/25243/26 "2020-06-02T10:05:28Z")

</div>

Hello there,

We acknowledged your feedback and made some changes

- The comment is now posted as CLOSED, so it shouldn’t be an issue anymore with autocomplete
- If you are using an hosted agent, and if the JAVA\_HOME\_11\_X64 is available, then it will be used for the analysis only.

Mickaël

---

<div class="post-metadata">

**Author:** ![Vossekop](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/vossekop/32/1129_2.png) [@Vossekop](https://community.sonarsource.com/u/Vossekop)\
**Post date:** [June 4, 2020, 8:30am UTC](https://community.sonarsource.com/t/older-default-java-version-used-with-azure-devops-hosted-agent/25243/27 "2020-06-04T08:30:28Z")

</div>

These sound like good improvements to me. Any indication on when it is released? Or has it already been released?

---

<div class="post-metadata">

**Author:** ![mickaelcaro](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mickaelcaro/32/4147_2.png) [@mickaelcaro](https://community.sonarsource.com/u/mickaelcaro)\
**Post date:** [June 4, 2020, 9:50am UTC](https://community.sonarsource.com/t/older-default-java-version-used-with-azure-devops-hosted-agent/25243/28 "2020-06-04T09:50:45Z")

</div>

Hi, these changes are already live 😉

---

<div class="post-metadata">

**Author:** ![gregpakes](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/gregpakes/32/756_2.png) [@gregpakes](https://community.sonarsource.com/u/gregpakes)\
**Post date:** [June 9, 2020, 1:14am UTC](https://community.sonarsource.com/t/older-default-java-version-used-with-azure-devops-hosted-agent/25243/29 "2020-06-09T01:14:10Z")

</div>

@mickaelcaro - Fantastic outcome. Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/system/32/78532_2.png) [@system](https://community.sonarsource.com/u/system)\
**Post date:** [June 16, 2020, 1:14am UTC](https://community.sonarsource.com/t/older-default-java-version-used-with-azure-devops-hosted-agent/25243/30 "2020-06-16T01:14:13Z")

</div>

Closed on June 16, 2020, 1:14am UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

[Previous page](https://community.sonarsource.com/t/older-default-java-version-used-with-azure-devops-hosted-agent/25243.md?page=1)
