Azure Batch Start task – JRE windows | Java Runtime Environment
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.
http://java.com/en/download/manual.jsp
To launch the JRE install sliently, you’ll want to pass the /s flag. This only works with the offline installer.
Ref: http://docs.oracle.com/javase/8/docs/technotes/guides/install/windows_installer_options.html
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”
EG;
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”
You should choose the options to “Run Elevated” and to “Wait for Success”.
When you add a node to the pool, you’ll find that Java is installed.