Installing OpenJDK for Jenkins
Before installing Jenkins, we need to ensure we have the correct version of the Java Development Kit. OpenJDK version 17 should be used and the latest version is recommended. The Java 17 SDK can be downloaded from https://www.oracle.com/java/technologies/downloads/#java17.
The easiest way to install Java 17 on Windows is to download and execute the MSI file and save it to the default path under the Program Files
folder. Copy the path and add it to the JAVA_HOME
environmental system variable’s path:
Figure 15.1 – Adding the path to the system variables in Windows
Then, add %JAVA_HOME%/bin
to the Path
variable:
Figure 15.2 – Adding the JAVA_HOME\bin to the Windows Path variable
Next, we must confirm Java is installed.
From the command prompt, type the following:
> java -version
You will see the following output:
Figure 15.3 –...