[英]How to upgrade java version on an Azure pipeline Microsoft-hosted agent?
I am setting up an Azure DevOps pipeline and I am running a jar (in one of the pipeline tasks) that needs a higher version of java than the one installed on the Microsoft-hosted agent used by the pipeline.我正在设置一个 Azure DevOps 管道,我正在运行一个 jar(在其中一个管道任务中),它需要比安装在管道使用的 Microsoft 托管代理上的更高版本的 java。 How can I update the java version on the agent and ensure that this job (the one that requires a high java version) gets executed on this agent?
如何更新代理上的 java 版本并确保此作业(需要高 java 版本的作业)在此代理上执行?
If you need a certain runtime or runtime version you need you can either use one of the provided "* Installer"-Tasks by microsoft or write some powershell that installs stuff for you but the main thing is that you set this up as part of the pipeline.如果您需要某个运行时或运行时版本,您可以使用微软提供的“*安装程序”-Tasks 之一,或者编写一些 powershell 来为您安装东西,但主要的是您将其设置为管道。
You need the task "Java Tool installer" as one of the first steps in your pipeline.您需要将任务“Java 工具安装程序”作为管道中的第一步。 Reference -> https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/tool/java-tool-installer?view=azure-devops
参考 -> https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/tool/java-tool-installer?view=azure-devops
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.