Some scripts require execution in 64 bit environment. This blog is a guide how you can switch Jason to execute them. A good example of such script will be the deployment script for Service Fabric.
This is one of the steps to enable Continuous delivery with Jenkins for a Service Fabric application. You can see all the steps here: http://blog.geo.bg/2017/11/12/continuous-delivery-for-a-service-fabric-application-with-jenkins/
There are simple steps to enable that:
1. Run PowerShell as Administrator
2. Install chocolatey (Makes it easy to install the JRE)
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
3. Install JRE:
choco install -y javaruntime
4. Edit jenkins.xml configuration (Default location: C:\Program Files (x86)\Jenkins)
Replace
<executable>%BASE%\jre\bin\java</executable>
with the path to your JRE.
<executable>C:\Program Files (x86)\Java\jre1.8.0_151\bin\java</executable>
5. Restart the service from PowerShell
Restart-Service Jenkins
That’s it. Now Jenkins is running as 64 bit application and you can execute any 64 bit script.
Let me know if you have any questions or comments how I can improve the blog.
Thanks,
George