Recall & Review
beginner
What is JDK in Jenkins?
JDK stands for Java Development Kit. In Jenkins, it is the Java environment Jenkins uses to run builds that require Java.
Click to reveal answer
beginner
How do you add a new JDK in Jenkins?
Go to Jenkins dashboard > Manage Jenkins > Global Tool Configuration > JDK section > Add JDK > Provide a name and either install automatically or specify the path.
Click to reveal answer
intermediate
What does 'Install automatically' mean in Jenkins JDK configuration?
It means Jenkins will download and install the JDK version automatically on the build agents when needed, without manual setup.
Click to reveal answer
beginner
Why is it important to configure JDK correctly in Jenkins?
Because Jenkins needs the right Java version to compile and run Java projects. Wrong JDK can cause build failures or unexpected errors.
Click to reveal answer
intermediate
How can you verify which JDK version Jenkins is using for a build?
Add a build step to run the command
java -version. The output shows the JDK version Jenkins uses during the build.Click to reveal answer
Where do you configure JDK installations in Jenkins?
✗ Incorrect
JDK installations are configured under Global Tool Configuration in Jenkins.
What happens if you select 'Install automatically' for a JDK in Jenkins?
✗ Incorrect
Selecting 'Install automatically' lets Jenkins handle JDK download and installation on build agents.
What command can you add in a Jenkins build step to check the JDK version used?
✗ Incorrect
The command 'java -version' prints the JDK version Jenkins is using.
Why might a Jenkins build fail if the JDK is not configured properly?
✗ Incorrect
Incorrect JDK version can cause compilation or runtime errors in Java builds.
Can you configure multiple JDK versions in Jenkins?
✗ Incorrect
Jenkins allows configuring multiple JDK versions to use different Java versions for different jobs.
Explain the steps to add and configure a new JDK in Jenkins.
Think about where Jenkins manages tools and how you specify JDK details.
You got /6 concepts.
Why is it important to verify the JDK version Jenkins uses during a build?
Consider what happens if Java versions mismatch.
You got /4 concepts.