# How do i upgrade java 8 to Java 11 for Jenkins on Windows machine

**URL:** <https://community.jenkins.io/t/how-do-i-upgrade-java-8-to-java-11-for-jenkins-on-windows-machine/14252>\
**Category:** Ask a question\
**Created:** [April 15, 2024, 12:18pm UTC](https://community.jenkins.io/t/how-do-i-upgrade-java-8-to-java-11-for-jenkins-on-windows-machine/14252 "2024-04-15T12:18:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Naren07](https://avatars.discourse-cdn.com/v4/letter/n/58956e/32.png) [@Naren07](https://community.jenkins.io/u/Naren07)\
**Post date:** [April 15, 2024, 12:18pm UTC](https://community.jenkins.io/t/how-do-i-upgrade-java-8-to-java-11-for-jenkins-on-windows-machine/14252/1 "2024-04-15T12:18:03Z")

</div>

How do i upgrade java8 to java 11 for Jenkins on Windows machine.  
I see many solutions mentioning to update in the Jenkins.XML file but i do not see that XML file in my Jenkins folder.

Can any one provide me a right solution?

---

<div class="post-metadata">

**Author:** ![slide\_o\_mix](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/slide_o_mix/32/20977_2.png) [@slide\_o\_mix](https://community.jenkins.io/u/slide_o_mix)\
**Post date:** [April 15, 2024, 2:16pm UTC](https://community.jenkins.io/t/how-do-i-upgrade-java-8-to-java-11-for-jenkins-on-windows-machine/14252/2 "2024-04-15T14:16:13Z")

</div>

If you used the installer to install Jenkins on your Windows system (I am assuming you are talking about a controller instance running on Windows), the file should be in C:\Program Files\Jenkins and is called jenkins.xml. Inside that file will be a JAVA\_HOME environment variable setting, you need to update that setting, save the file and restart the Jenkins service.

---

<div class="post-metadata">

**Author:** ![Naren07](https://avatars.discourse-cdn.com/v4/letter/n/58956e/32.png) [@Naren07](https://community.jenkins.io/u/Naren07)\
**Post date:** [April 15, 2024, 2:58pm UTC](https://community.jenkins.io/t/how-do-i-upgrade-java-8-to-java-11-for-jenkins-on-windows-machine/14252/3 "2024-04-15T14:58:00Z")

</div>

Thank you for the information, suppose if it was installed with .war file would be still find the Jenkins.xml file. If no how could i change java version of Jenkins apart from updating the env variables.

---

<div class="post-metadata">

**Author:** ![slide\_o\_mix](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/slide_o_mix/32/20977_2.png) [@slide\_o\_mix](https://community.jenkins.io/u/slide_o_mix)\
**Post date:** [April 15, 2024, 5:13pm UTC](https://community.jenkins.io/t/how-do-i-upgrade-java-8-to-java-11-for-jenkins-on-windows-machine/14252/4 "2024-04-15T17:13:46Z")

</div>

It would depend on how you set it up. Did you create your own service setup?

---

<div class="post-metadata">

**Author:** ![Naren07](https://avatars.discourse-cdn.com/v4/letter/n/58956e/32.png) [@Naren07](https://community.jenkins.io/u/Naren07)\
**Post date:** [April 16, 2024, 7:30am UTC](https://community.jenkins.io/t/how-do-i-upgrade-java-8-to-java-11-for-jenkins-on-windows-machine/14252/5 "2024-04-16T07:30:34Z")

</div>

Yeah the service is setup through the Task Scheduler. Also we have done through war file in Windows machine.  
I do not see see jenkins.xml file  
How should i update the java version for Jenkins in that cases?

---

<div class="post-metadata">

**Author:** ![slide\_o\_mix](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/slide_o_mix/32/20977_2.png) [@slide\_o\_mix](https://community.jenkins.io/u/slide_o_mix)\
**Post date:** [April 16, 2024, 11:20pm UTC](https://community.jenkins.io/t/how-do-i-upgrade-java-8-to-java-11-for-jenkins-on-windows-machine/14252/6 "2024-04-16T23:20:42Z")

</div>

Ok, then in the Task Scheduler you most likely have a command line that is run to start Jenkins. You would need to change the java.exe path in that command to the new version of Java.

---

<div class="post-metadata">

**Author:** ![Naren07](https://avatars.discourse-cdn.com/v4/letter/n/58956e/32.png) [@Naren07](https://community.jenkins.io/u/Naren07)\
**Post date:** [October 24, 2024, 1:49pm UTC](https://community.jenkins.io/t/how-do-i-upgrade-java-8-to-java-11-for-jenkins-on-windows-machine/14252/7 "2024-10-24T13:49:27Z")

</div>

When the setup is done through WAR file and you have java 8 and java 11 in machine . Jenkins by default takes Java11 version.
