I’ve had to set Azure Batch up for a Java application, on Windows (go figure 🙂 ).
The first thing you need to do is get the Java Offline Installer.
To launch the JRE install sliently, you’ll want to pass the /s flag. This only works with the offline installer.
Upload the installer to an Azure storage account, and note the public url to it.
Go to your Azure Batch account in the portal, click on the compute pool that you want to add the start task for.
Click resources, and enter the Azure Storage URL of the installer along with a destination path.
NB: Resource Paths are relational. Just enter the name of the file you want created, and it’ll be created here “C:\user\tasks\startup\wd\jre-8u101-windows-x64.exe”
Bad | “d:\jre” : “The resource file path is not valid”
Bad | “d:\jre\jre-8u101-windows-x64.exe” : “The resource file path is not valid”
Good | “jre-8u101-windows-x64.exe”