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.

Note that you can now also download Early Access versions of the JDK. If these contain experimental features, IntelliJ IDEA will show you a legal notice to accept the terms to use the experimental features by clicking Accept.

Interested in JVM Development?

call to action image

Did you know you can turn on Java preview features in IntelliJ IDEA?

Learn More

Related Resources

Add arguments
Add arguments
Add args to your main method.
Compact source file
Compact source file
Create a compact source file in IntelliJ IDEA.
Convert compact source file to class
Convert compact source file to class
Convert a compact source file to a class in IntelliJ IDEA.