How to fix project configuration problems

In some cases you may not be able to run the example projects I have posted to the course web site. This is most often due to a project configuration issue.

Here are some instructions on how to fix this.

  1. Start by making sure that you have the most recent Java development kit installed. Go to jdk.java.net/22/ to grab the OpenJDK 22. (If you need help installing that JDK on your system, see me.)
  2. Download and open my example project in Spring Tool Suite.
  3. Right-click on the project and select Properties.
  4. Select the Java Build Path category in the project properties dialog.
  5. The source of the trouble is an incorrect JRE System Library setting. Click on that setting and then click the Edit... button.
  6. In the next dialog, click on the Alternate JRE option and select OpenJDK 22.
  7. Click the Installed JREs... button. That next dialog should look something like this:
  8. Note that I have selected the OpenJDK 22 that I have installed on my system, and the path to that JDK looks right.
  9. At this point you should be able to close all of these dialogs and run the project.