Java Configuration in Jenkins


Install and Configure Jenkins using Jenkins.war if you have not installed Jenkins yet.

Once installation is successfully completed with initial configuration, On Jenkins Dashboard, click on Manage Jenkins

11

Click on the Global Tool Configuration Link.

Manage Jenkins

There are two options to configure.

  1. You can Install Automatically by clicking on the checkbox and selecting specific version
  2. If Java is already installed then give its path directly so we can configure it while creating a new build for Java Projects

Uncheck the checkbox for installing Java automatically as we assume that Java is already available. Give JAVA_HOME path (Not of bin folder).

Java and Jenkins Configuration
Consider, we have multiple JDKs are available in the system, we will configure two JDK in Jenkins.

Give Name for JDK installation and then provide path to that JDK folder available in your system.

Java and Jenkins Configuration

Click on Add JDK. Give Name for another JDK and Give Name and Path of JDK available in your system.

Java and Jenkins Configuration

Click on Apply and Save.

Done.

Leave a comment

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