Jenkins Installation error

It looks like you still have a JDK 11 installed, and that is the one that is used for Jenkins. :thinking:
It also looks like you’re running the weekly version of Jenkins, which now needs a JDK17 to work.

To get all the JDK and JRE versions installed under Amazon Linux, you can use the alternatives command to list all the installed Java alternatives. Additionally, you can use the java -version and javac -version commands to check the currently active JRE and JDK versions, respectively.

To make JDK 17 the default JDK used on Amazon Linux, you can use the alternatives command to configure the default version of Java. This involves setting the default for both java (which affects the JRE) and javac (which affects the JDK).

Here’s a step-by-step guide in pseudocode:

  1. List all installed Java alternatives:
  • Use alternatives --display java to list all Java installations and their paths.
  • Use alternatives --display javac to list all JDK installations and their paths.
  1. Set JDK 17 as the default:
  • Identify the installation path of JDK 17 from the list obtained in step 1.
  • Use sudo alternatives --config java and follow the prompt to select JDK 17 for the JRE.
  • Use sudo alternatives --config javac and follow the prompt to select JDK 17 for the JDK.
1 Like