Jenkins: How to add a JDK version

This guide will show you how to add a JDK version to Jenkins. If you plan to run a Java build requiring a specific version of the Java Development Kit, you need to do this.

What is a JDK?

JDK is short for Java Development Kit, and it is a core technology packages used in Java programming. The JDK allows developers to create Java programs. Once compiled, the Java code can then be executed and run by the Java virtual machine and the Java runtime environment.

Let’s add a JDK version to Jenkins

You can add a JDK version by navigating to Jenkins -> Manage Jenkins -> Global Tool Configuration.

The global tool configuration menu will open the following window:

Next, click the JDK Installations” button under the JDK section to configure multiple JDK versions.

You should now see a window similar to this:

Next, follow these steps to add your JDK version:

  • Add a name for the Java version
  • Then check the toggle for Install automatically.
  • Next select the JDK Version from the dropdown.
  • Enter your Oracle account credentials.
  • Check the License Agreement checkbox.
  • Then finally click the “Save” button.

Finally, you can also use installers other than Oracle. So, if you need to change it, click the “Add Installer” select list for the available options.

Wrapping up

Now you know how to add a JDK version to your Jenkins installation.

You may also be interested in

YouTube player

About Anto Online

Anto, a seasoned technologist with over two decades of experience, has traversed the tech landscape from Desktop Support Engineer to enterprise application consultant, specializing in AWS serverless technologies. He guides clients in leveraging serverless solutions while passionately exploring cutting-edge cloud concepts beyond his daily work. Anto's dedication to continuous learning, experimentation, and collaboration makes him a true inspiration, igniting others' interest in the transformative power of cloud computing.

View all posts by Anto Online

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.