Introduction
Jenkins needs Java to run jobs that build and test Java applications. Configuring the JDK in Jenkins tells it where to find Java so it can compile and run your code.
When you want Jenkins to build Java projects using a specific Java version.
When you have multiple Java versions installed and want to choose which one Jenkins uses.
When setting up a new Jenkins server that does not yet know where Java is installed.
When upgrading Java and you want Jenkins to use the new version for builds.
When you want to run Jenkins jobs that require Java commands like javac or java.