The Jdk Plugin for Jenkins is an open source plugin and is available to download from below link. Download Now .
Lately, I have been focusing on a course related to Jenkins. It is the most important SCM (Source Code Management) tool we have for now. Obviously, the number of articles about this topic is increasing every day. One of them goes by the following title: “Install and Use Jenkins with JDK Plugin”.
A while ago I was searching for a plugin to compile my Java projects in Jenkins using JDK8, that I could have both Linux and Windows as compilation targets. I could not find one so I started developing one myself.
Jdk Plugin For Jenkins
This plugin adds a build parameter which can be used to set the JDK to be used with a job on a per-build basis. The JDKs that can be chosen from can be specified on the configuration page of any job that has the JDK parameter enabled.
The plugins configuration is located in the ‘Parameters’ section of the job configuration UI.
There will be a dropdown list to select what should be used as the default JDK on the build parameters page and a multi-selection box where you can choose what JDKs are available to pick from as a build parameter for that job.
On the build parameters page there will be a dropdown choice of what JDK to use for the build.
During the build phase of a job that has JDK Parameter configured, the ‘JDK’ option of Jenkins is replaced with the JDK selected on ‘JDK Parameter’ and restored to the original value at the end of the build. This means that if a job runs multiple builds at the same time, the ‘JDK’ option of the job configuration could be restored to the wrong value.