SDKs
A Software Development Kit, or an SDK, is a collection of tools that you need to develop an application for a specific software framework. For example, to develop applications in Java, you need a Java SDK (JDK). SDKs contain binaries, source code for the binaries, and documentation for the source code. For Java, SDKs also contain annotations.
Generally, SDKs are global. It means that one SDK can be used in multiple projects and modules. After you create a new project and define an SDK for it, you can configure modules in this project to inherit its SDK. You can also specify an SDK for each module individually. For more information, refer to Change module SDK.
Supported SDKs
- Java SE Developments Kits (JDKs)
- Java Micro Edition (ME) SDKs
- Android SDKs
- Google App Engine SDK
IntelliJ Platform Plugin SDK (for developing IntelliJ IDEA plugins)
Define an SDK
To define an SDK means to let IntelliJ IDEA know in which folder on your computer the necessary SDK version is installed. This folder is called SDK home directory.
Manage global SDKs
From the main menu, select
Ctrl+Shift+Alt+S.On the panel on the left, locate the Platform Settings section and select SDKs.
To add a new SDK or a new SDK version, click Shift+Enter, select the SDK type and specify its installation directory.
To remove an SDK, select it in the list and click Alt+Delete.
Change project SDK
From the main menu, select
Ctrl+Shift+Alt+S.On the panel on the left, locate the Project Settings section and select Project.
-
From the Project SDK list, select another SDK or SDK version.
If the necessary SDK is not defined in IntelliJ IDEA yet, click New and specify its home directory.
Change module SDK
From the main menu, select
Ctrl+Shift+Alt+S.On the panel on the left, locate the Project Settings section and select Modules.
Select the necessary module and click Dependencies.
-
From the Module SDK list, select another SDK or SDK version you want to use.
If the necessary SDK is not defined in IntelliJ IDEA yet, click New and specify its home directory.
If you want a module to inherit a project SDK, select the Project SDK option from the Module SDK list.
Java Development Kit (JDK)
To develop applications in IntelliJ IDEA, you need the Java SDK (JDK). The JDK is a software package that contains libraries, tools for developing and testing Java applications (development tools), and tools for running applications on the Java platform (Java Runtime Environment — JRE).
The JRE can be obtained separately from the JDK, but it's not suitable for application development, as it doesn't have essential components such as compilers and debuggers.
IntelliJ IDEA doesn't come with the JDK, so if you don't have the necessary JDK version, download and install it. Note that some frameworks require their own SDKs in addition to the JDK, for example, Android or Grails.
Download a JDK package
-
Open the jdk.java.net website.
There, you'll find the Oracle's OpenJDK binaries for Windows, macOS, and Linux as .tar.gz and .zip archives.
-
Select and download the necessary JDK version.
If you're not sure which version you need, select the latest stable version.
Unzip the archive and place the folder with Java to a meaningful location, for example: /Library/Java/JavaVirtualMachines on macOS or to C:\Program Files\Java on Windows.
Example: Setting up the project JDK
From the main menu, select
Ctrl+Shift+Alt+S.On the panel on the left, locate the Project Settings section and select Project.
In the Project SDK section, click New and specify the path to the Java directory on your computer.
Apply the changes and close the dialog.