How to use jlink in azure DevOps pipeline

Hi,

I am using SonarQube tasks in Azure DevOps pipeline with Java 11.0.7. With Java 9 version Oracle stops providing JRE and asking to use jlink to create application specific JRE. Without JRE with Java 11.0.7 version my pipeline build is failing.

Could you please tell me how can I use jlink in pipeline and have JRE created.

Can anyone reply?

Since 10.x version onward Java doesn’t provide JRE with JDK. Due to this our pipeline is failing as it doesn’t find JRE. So it was mentioned that jlink is to be used instead of JRE.
Could you please tell me how do we specify jlink in Azure DevOps pipeline or how to avoid failing build pipeline using jlink.

Can anyone reply?

Hi @Rasik_Bapotra

Sorry for the delay, but no 24h support is done by our team here, and especially on week ends (this was a bank holliday yesterday in some countries in Europe) :wink:

That being said, are you using a Microsoft-hosted agent ?

In any case, you always have the possibility to install whatever you want with some powershell script, and adding an environment variable to the path where jlink is should do the trick.

HTH,
Mickaël

Hi Mickael,

Jlink is a replacement of JRE from JDK 10.x. Azure Devops build is not working saying JRE is required. How do I use Jlink in Azure DevOps pipeline ?

Which kind of error do you have exactly ? Is this related to SonarQube ?

Yes, its related to SonarQube. SonarQube require java. We are setting up build agent on one of the server and while testing its breaking. If we install JRE 8 then it works fine. But this creates vulnerability issue as we don’t want to keep older version. We have JDK 11.0.7 and JRE is not provided. Hence build is failing.