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.
- 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.)
- Download and open my example project in Spring Tool Suite.
- Right-click on the project and select Properties.
- Select the Java Build Path category in the project properties dialog.
- The source of the trouble is an incorrect JRE System Library setting. Click on that setting and then click the Edit... button.
- In the next dialog, click on the Alternate JRE option and select OpenJDK 22.
- Click the Installed JREs... button. That next dialog should look something like this:
- Note that I have selected the OpenJDK 22 that I have installed on my system, and the path to that JDK looks right.
- At this point you should be able to close all of these dialogs and run the project.