# How to use two different versions of JDK

**URL:** <https://community.jenkins.io/t/how-to-use-two-different-versions-of-jdk/5856>\
**Category:** Using Jenkins\
**Created:** [February 19, 2023, 12:51am UTC](https://community.jenkins.io/t/how-to-use-two-different-versions-of-jdk/5856 "2023-02-19T00:51:27Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![MarkEWaite](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/markewaite/32/20_2.png) [@MarkEWaite](https://community.jenkins.io/u/MarkEWaite)\
**Post date:** [February 19, 2023, 1:16am UTC](https://community.jenkins.io/t/how-to-use-two-different-versions-of-jdk/5856/2 "2023-02-19T01:16:38Z")

</div>

Hi there,

As a reminder, the term “slave” to refer to an agent has been deprecated since 2016. The term “master” to refer to the controller has been deprecated since 2020. Please refer to [On Jenkins Terminology Updates](https://www.jenkins.io/blog/2020/06/18/terminology-update/) for more details. We request you update your post.

Yes, you can build with a different JDK than is used for the controller or the agent. See the video from Darin Pope at

[![](https://europe1.discourse-cdn.com/flex013/uploads/jenkins/original/2X/f/fba70765f21806eaab73ade554ee1fe7c81f7d4f.jpeg "How to Configure a JDK in Jenkins") ](https://www.youtube.com/watch?v=qx3XK82BZPk)

If the Jenkins job type that is being used is a maven integration job type rather than a Pipeline job or a freestyle job, then you’ll want to convert the job to a Pipeline job. See an [earlier answer](https://community.jenkins.io/t/end-of-java8-agent-support-in-jenkins-2-361-1-lts/5779/3) for more links related to the transition from a maven integration job type to a Pipeline job.

---

_[View the full topic](https://community.jenkins.io/t/how-to-use-two-different-versions-of-jdk/5856)._
