Download a JDK
Download or Associate a JDK With Your Project.
You can use the New Project Wizard to configure existing JDKs, or download new ones from different vendors.
If the necessary JDK is already defined in IntelliJ IDEA, select it from the JDK list.
If the JDK is installed on your computer, but not defined in the IDE, select the option Add JDK from the list and specify the path to the JDK home directory (for example, /Library/Java/JavaVirtualMachines/jdk-21.0.2.jdk
).
If you don't have the necessary JDK on your computer, select Download JDK. In the Download JDK popup, specify the JDK vendor and version, change the installation path if required, and click Download.