Search code examples
javaazure-devopscapabilitybuild-agent

VSTS buildagent: Java 9


I installed the latest java sdk (included jre) version 9.0.1 on my buildserver and restarted the agents. The agent does not seem to detect Java, the java-capabilities are missing and builds won't run because the java-capability is not set on the agent.

Is there anything i have to do to get java recognized ? the last java 8.* version was propery recognized


Solution

  • Based on [agent folder]\bin\Add-JavaCapabilities.ps1, there are JDK 6,7,8, no JDK 9, so it can’t recognize JDK 9. I submit a user voice here: VSTS build agent capabilities for JAVA 9, you can vote it.

    You can try to add capability manually:

    1. Go to agent pool admin page (https://XXX.visualstudio.com/_admin/_AgentPool)
    2. Select the pool and agent
    3. Click Add capability