title: Azure Devops Pipeline : Accessing agent JAVA_HOME variable in xml file
body: <p>For my java project, I am using azure devops pipeline for building. For configuring the jdkhome path, I am putting it in the toolchains xml file placed in root folder of project :</p>
  <pre><code>&lt;toolchain&gt;
      &lt;type&gt;jdk&lt;/type&gt;
      &lt;provides&gt;
        &lt;version&gt;1.8&lt;/version&gt;
        &lt;vendor&gt;oracle&lt;/vendor&gt;
      &lt;/provides&gt;
      &lt;configuration&gt;
        &lt;!--&lt;jdkHome&gt;/usr/lib/jvm/zulu-8-azure-amd64&lt;/jdkHome&gt;--&gt;
      &lt;/configuration&gt;
    &lt;/toolchain&gt;
  </code></pre>
  <p>But the azure devops agent has updated their jdk and its failing my build. So, now rather than hardcoding, I want to pick the path from agent. I see that on agent, environment variable is set as  $JAVA_HOME_8_X64 with the path assigned to it.</p>
  <p>So, how can I use this environment variable in my pipeline weather refer it in toolschain xml file or in some other way?</p>
  <p>I tried to directly refer in xml and it did not work. I also tried to add some tasks from marketplace but did not work. Can someone help me with this?</p>