I would nonetheless encourage you to try intalling JDK 17
in addition to JDK 21. I recommend the
sdkman tool for this - at least if you're on a Mac or Unix. It also runs on Windows, and it probably works fine here too; I just don't have experience there to recommend it. Using sdkman it becomes quite easy to have multiple versions of Java on your machine, and switch between them easily. I use it to configure a JDK version for particular directories, so that I can have one Java 21 project directory where any time I go to that directory, it sets the JDK version to a particular JDK 21 installation, while resetting it to JDK 17 whenever I'm anywhere else (since that's the version I need for work). The sdkman tool makes this pretty easy to set up.