IntelliJ IDEA 2021.2 Help

Create a new project

  1. Launch IntelliJ IDEA.

    If the Welcome screen opens, click New Project.

    Otherwise, from the main menu, select File | New | Project.

  2. From the list on the left, select the framework that you want to use in your application.

  3. If suggested, configure the project SDK. To develop Java-based applications, you need a JDK (Java Development Kit).

    If the necessary JDK is already defined in IntelliJ IDEA, select it from the Project SDK list.

    If the JDK is installed on your computer, but not defined in the IDE, select Add JDK and specify the path to the JDK home directory (for example, /Library/Java/JavaVirtualMachines/jdk-12.0.1.jdk).

    Configuring an SDK for the new project

    If you don't have the necessary JDK on your computer, select Download JDK. In the next dialog, specify the JDK vendor, version, and change the installation path if required.

    Downloading a JDK for the new project
  4. Other options differ depending on the framework that you have selected. Refer to the list below for the detailed description of options for each framework.

Java

Additional Libraries and Frameworks

Select the technologies, frameworks and languages that you want your project to support, and specify the associated settings.

Create project from templateCreate a simple Java application that includes a class with main() method.
Project nameSpecify the project name.
Project locationSpecify the path to the directory in which you want to create the project. By default, the IDE creates a directory with the same name as the project.
Module name

Specify the module name. By default, the project name is used.

For more information on modules and the difference between projects and modules, refer to Configure projects and Modules.

Content rootSpecify the path to the module content root folder (the folder that stores your source code). It's recommended that you use the default path.
Module file locationSpecify the path to the folder where the .iml module file should be created. By default, this file is created in the module content root folder (recommended).
Project formatIt's recommended that you use the directory-based format.

Maven

Create from archetype

Select this checkbox if you want to use a predefined project template for your project. You can configure your own archetype by clicking Add Archetype.

NameSpecify the project name.
LocationSpecify the path to the directory in which you want to create the project. By default, the IDE creates a directory with the same name as the project.
GroupIdSpecify a package of a new project.
ArtifactIdSpecify the name of your project.
VersionSpecify a version of a new project. By default, this field is specified automatically.
Maven home directorySelect a bundled Maven version that is available or the result of resolved system variables such as MAVEN_HOME or MAVEN2_HOME. You can also specify your own Maven version that is installed on your machine.
User settings file

Specify the file that contains user-specific configuration for Maven in the text field.

If you need to specify another file, select the Override checkbox, click the Browse button, and select another file.

Local repository

By default, this field shows the path to the local directory under the user home that stores downloads and contains the temporary build artifacts that you have not yet released.

If you need to specify another directory, select the Override checkbox, click the Browse button, and select another directory.

Properties

By default, the columns in this area display system properties that are passed to Maven for creating a project from the archetype.

You can add, remove, and edit these properties.

Gradle

Kotlin DSL build script

Select this checkbox if you want to use the script.

Additional Libraries and Frameworks

Select the technologies, frameworks and languages that you want your project to support, and specify the associated settings.

NameSpecify the project name.
LocationSpecify the path to the directory in which you want to create the project. By default, the IDE creates a directory with the same name as the project.
GroupIdSpecify groupId of the new project. You can omit this field if you plan to deploy your project locally.
ArtifactIdSpecify artifactId that is added as a name of your new project.
VersionSpecify version of the new project. By default, this field is filled in automatically.

Android

Select the type of project you want to create from categories of device form factors that are shown as tabs at the top of the wizard.

Creating a new Android project
NameSpecify the name for your project.
Package nameSpecify the package name. By default, this package name also becomes your application ID. If necessary, you will be able to change it later.
Save locationUse this field to specify the location of your project.
LanguageSelect the Language you want to use for creating sample code for your new project.
Minimum SDKSelect the minimum API level that you want to use in the project. If you are not sure which level to select, click the Help me choose link in the dialog.
This project will support instant appsSelect the checkbox if your project supports instant experiences though Google Play Instant, and you want to enable it for your application.

IntelliJ Platform Plugin

Project SDKSelect the SDK that you want to use for developing your plugin.
Additional Libraries and Frameworks

Select the technologies, frameworks and languages that you want your project to support, and specify the associated settings.

Project nameSpecify the project name.
Project locationSpecify the path to the directory in which you want to create the project. By default, the IDE creates a directory with the same name as the project.
Module name

Specify the module name. By default, the project name is used.

For more information on modules and the difference between projects and modules, refer to Configure projects and Modules.

Content rootSpecify the path to the module content root folder (the folder that stores your source code). It's recommended that you use the default path.
Module file locationSpecify the path to the folder where the .iml module file should be created. By default, this file is created in the module content root folder (recommended).
Project formatIt's recommended that you use the directory-based format.

JavaFX

NameSpecify a name for your project.
LocationSpecify the path to the directory in which you want to create the project. By default, the IDE creates a directory with the same name as the project.
LanguageSelect a language: Java, Kotlin, or Groovy.
Build systemSelect the build tool that will be used for managing dependencies, testing, packaging, automating the build process, and so on.
Test frameworkSelect a test framework: JUnit or TestNG.
GroupSpecify the unique group identifier for your project. It should preferably start with the reversed domain name you control (for example, com.example).
ArtifactSpecify a name for the artifact within the group, usually the project's name.
Project SDK

Select the JDK that you want to use in your project.

If the JDK is installed on your computer, but not defined in the IDE, select Add JDK and specify the path to the JDK home directory.

If you don't have the necessary JDK on your computer, select Download JDK.

Select the libraries that you want to use in your application.

Creating a new JavaFX project

Java Enterprise

NameSpecify a name for your project.
LocationSpecify the path to the directory in which you want to create the project. By default, the IDE creates a directory with the same name as the project.
Project templateSelect a template for your application. IntelliJ IDEA will pre-configure your project accordingly.
Application server

Specify the application server that you want to use in this application.

IntelliJ IDEA provides integration with various application servers, enabling you to start and stop local servers, connect to running remote servers, and deploy your artifacts on those servers.

Build systemSelect the build tool that will be used for managing dependencies, testing, packaging, automating the build process, and so on.
Test frameworkSelect a test framework: JUnit or TestNG.
LanguageSelect a language: Java, Kotlin, or Groovy.
GroupSpecify the unique group identifier for your project. It should preferably start with the reversed domain name you control (for example, com.example).
ArtifactSpecify a name for the artifact within the group, usually the project's name.
Project SDK

Select the JDK that you want to use in your project.

If the JDK is installed on your computer, but not defined in the IDE, select Add JDK and specify the path to the JDK home directory.

If you don't have the necessary JDK on your computer, select Download JDK.

VersionSelect the Java EE version that you want to use.
DependenciesSelect the technologies, frameworks and languages that you want your project to support.

Spring Initializr

Server URL

Use the default https://start.spring.io/ service or specify a custom instance. For more information, see Creating your own instance.

NameSpecify a name for your project.
LocationSpecify the path to the directory in which you want to create the project. By default, the IDE creates a directory with the same name as the project.
LanguageSelect a language: Java, Kotlin, or Groovy.
TypeSelect the build tool to use for managing dependencies, testing, packaging, automating the build process, and so on: Maven or Gradle.
GroupSpecify the unique group identifier for your project. It should preferably start with the reversed domain name you control (for example, com.example).
ArtifactSpecify a name for the artifact within the group, usually the project's name.
Package nameSpecify the root package of the project. This is usually a combination of the group and artifact names, for example: com.example.springdemo.
Project SDK

Select the JDK that you want to use in your project.

If the JDK is installed on your computer, but not defined in the IDE, select Add JDK and specify the path to the JDK home directory.

If you don't have the necessary JDK on your computer, select Download JDK.

JavaSelect the Java version that Spring Initializr should use.
PackagingSelect whether you want to package the app as a JAR or WAR.
Spring BootSelect the Spring Boot version.
Download pre-built shared indexes for JDK and Maven librariesSilently download the pre-built shared indexes for JDK and Maven libraries instead of building the indexes. For more information, see Shared indexes.
DependenciesSelect starters and dependencies for your project. If you select technologies that require additional plugins, the IDE will notify you about it once the project is created, and will suggest installing or enabling them.
Spring boot

Quarkus

NameSpecify a name for your project.
LocationSpecify the path to the directory in which you want to create the project. By default, the IDE creates a directory with the same name as the project.
LanguageSelect a language: Java, Kotlin, or Groovy.
Build systemSelect the build tool that will be used for managing dependencies, testing, packaging, automating the build process, and so on.
GroupSpecify the unique group identifier for your project. It should preferably start with the reversed domain name you control (for example, com.example).
ArtifactSpecify a name for the artifact within the group, usually the project's name.
Project SDK

Select the JDK that you want to use in your project.

If the JDK is installed on your computer, but not defined in the IDE, select Add JDK and specify the path to the JDK home directory.

If you don't have the necessary JDK on your computer, select Download JDK.

Example codeCreate a code sample together with the project.

Select extensions that you want to use in your project. If you select technologies that require additional plugins, the IDE will notify you about it once the project is created, and will suggest installing or enabling them.

Selecting extensions for the new Quarkus project

For more information, refer to Quarkus.

Micronaut

Server URLSpecify the URL of the starter service that you want to use in your application. By default, the https://micronaut.io/launch/ instance is specified, but you can use another custom service.
NameSpecify a name for your project.
LocationSpecify the path to the directory in which you want to create the project. By default, the IDE creates a directory with the same name as the project.
LanguageSelect a language: Java, Kotlin, or Groovy.
Build systemSelect the build tool that will be used for managing dependencies, testing, packaging, automating the build process, and so on.
Test frameworkSelect a test framework: JUnit or TestNG.
GroupSpecify the unique group identifier for your project. It should preferably start with the reversed domain name you control (for example, com.example).
ArtifactSpecify a name for the artifact within the group, usually the project's name.
Application typeSelect an application type from thr list.
Project SDK

Select the JDK that you want to use in your project.

If the JDK is installed on your computer, but not defined in the IDE, select Add JDK and specify the path to the JDK home directory.

If you don't have the necessary JDK on your computer, select Download JDK.

JavaSelect the Java version that Spring Initializr should use.

Select extensions that you want to use in your project. If you select technologies that require additional plugins, the IDE will notify you about it once the project is created, and will suggest installing or enabling them.

Selecting extensions for the new Micronaut project

For more information, refer to Micronaut.

MicroProfile

Server URLSpecify the URL of the starter service that you want to use in your application. By default, the https://start.microprofile.io/ instance is specified, but you can use another custom service.
NameSpecify a name for your project.
LocationSpecify the path to the directory in which you want to create the project. By default, the IDE creates a directory with the same name as the project.
MicroProfile RuntimeSelect the runtime that you want to use.
GroupSpecify the unique group identifier for your project. It should preferably start with the reversed domain name you control (for example, com.example).
ArtifactSpecify a name for the artifact within the group, usually the project's name.
Project SDK

Select the JDK that you want to use in your project.

If the JDK is installed on your computer, but not defined in the IDE, select Add JDK and specify the path to the JDK home directory.

If you don't have the necessary JDK on your computer, select Download JDK.

Select specifications that you want to use in your project. If you select technologies that require additional plugins, the IDE will notify you about it once the project is created, and will suggest installing or enabling them.

Selecting specifications for the new MicroProfile project

Ktor

NameSpecify a name for your project.
LocationSpecify the path to the directory in which you want to create the project. By default, the IDE creates a directory with the same name as the project.
Build systemSelect the build tool that will be used for managing dependencies, testing, packaging, automating the build process, and so on.
WebsiteA domain used to generate a package name.
ArtifactA generated artifact name.
Ktor VersionA required Ktor version.
Ktor VersionA required Ktor version.
EngineAn engine used to run a server.
Configuration inSelect whether to specify server parameters in code or in a HOCON file.
Add sample codeLeave this option enabled to add sample code for plugins added on the next page.

On the next page, select plugins (formerly known as features) that you want to use in this application. They provide common functionality of a Ktor application, for example, authentication, serialization and content encoding, compression, cookie support, and so on.

Creating a new Ktor project

Groovy

Groovy libraryIf the necessary version of Groovy is already defined in IntelliJ IDEA, select it from the list. Alternatively, click Create and select the Groovy installation directory.
Additional Libraries and Frameworks

Select the technologies, frameworks and languages that you want your project to support, and specify the associated settings.

Project nameSpecify the project name.
Project locationSpecify the path to the directory in which you want to create the project. By default, the IDE creates a directory with the same name as the project.
Module name

Specify the module name. By default, the project name is used.

For more information on modules and the difference between projects and modules, refer to Configure projects and Modules.

Content rootSpecify the path to the module content root folder (the folder that stores your source code). It's recommended that you use the default path.
Module file locationSpecify the path to the folder where the .iml module file should be created. By default, this file is created in the module content root folder (recommended).
Project formatIt's recommended that you use the directory-based format.

Grails App Forge

Project TypeSelect an application type (Application or Plugin).
Grails VersionSelect the Grails version that you want to use in your application.
ProfileSelect the necessary application profile.
FeaturesSelect the necessary checkboxes to specify features for your project.
Project nameSpecify the project name.
Project locationSpecify the path to the directory in which you want to create the project. By default, the IDE creates a directory with the same name as the project.
Module name

Specify the module name. By default, the project name is used.

For more information on modules and the difference between projects and modules, refer to Configure projects and Modules.

Content rootSpecify the path to the module content root folder (the folder that stores your source code). It's recommended that you use the default path.
Module file locationSpecify the path to the folder where the .iml module file should be created. By default, this file is created in the module content root folder (recommended).
Project formatIt's recommended that you use the directory-based format.

JavaScript (Static Web)

Select the necessary framework:

Creating a new JavaScript project
Project nameSpecify the project name.
Project locationSpecify the path to the directory in which you want to create the project. By default, the IDE creates a directory with the same name as the project.
VersionSpecify the version of the template in accordance to which the stub will be generated. Click the Refresh button to refresh the list of available template versions.
Module nameSpecify the module name. By default, the project name is used.
Content rootSpecify the path to the module content root folder (the folder that stores your source code). It's recommended that you use the default path.
Module file locationSpecify the path to the folder where the .iml module file should be created. By default, this file is created in the module content root folder (recommended).
Project formatIt's recommended that you use the directory-based format.
Project nameSpecify the project name.
Project locationSpecify the path to the directory in which you want to create the project. By default, the IDE creates a directory with the same name as the project.
Node interpreter

Specify the Node.js interpreter that you want to use in this project. You can select a configured interpreter from the list or click Add to configure a new one.

If you have no Node.js on your computer, select Download Node.js from the list.

create-react-app

Select npx create-react-app.

Alternatively, for npm version 5.1 and earlier, install the create-react-app package yourself by running npm install --g create-react-app in the Terminal Alt+F12. When creating an application, select the folder where the create-react-app package is stored.

Create TypeScript projectSelect this checkbox to enable TypeScript for your project.
Module nameSpecify the module name. By default, the project name is used.
Content rootSpecify the path to the module content root folder (the folder that stores your source code). It's recommended that you use the default path.
Module file locationSpecify the path to the folder where the .iml module file should be created. By default, this file is created in the module content root folder (recommended).
Project formatIt's recommended that you use the directory-based format.
Project nameSpecify the project name.
Project locationSpecify the path to the directory in which you want to create the project. By default, the IDE creates a directory with the same name as the project.
VersionSpecify the version of the template in accordance to which the stub will be generated. Click the Refresh button to refresh the list of available template versions.
Module nameSpecify the module name. By default, the project name is used.
Content rootSpecify the path to the module content root folder (the folder that stores your source code). It's recommended that you use the default path.
Module file locationSpecify the path to the folder where the .iml module file should be created. By default, this file is created in the module content root folder (recommended).
Project formatIt's recommended that you use the directory-based format.
Project nameSpecify the project name.
Project locationSpecify the path to the directory in which you want to create the project. By default, the IDE creates a directory with the same name as the project.
VersionSpecify the version of the template in accordance to which the stub will be generated. Click the Refresh button to refresh the list of available template versions.
Module nameSpecify the module name. By default, the project name is used.
Content rootSpecify the path to the module content root folder (the folder that stores your source code). It's recommended that you use the default path.
Module file locationSpecify the path to the folder where the .iml module file should be created. By default, this file is created in the module content root folder (recommended).
Project formatIt's recommended that you use the directory-based format.
Project nameSpecify the project name.
Project locationSpecify the path to the directory in which you want to create the project. By default, the IDE creates a directory with the same name as the project.
Node interpreter

Specify the Node.js interpreter that you want to use in this project. You can select a configured interpreter from the list or click Add to configure a new one.

If you have no Node.js on your computer, select Download Node.js from the list.

Angular CLI

Select npx --package @angular/cli ng.

Alternatively, for npm version 5.1 and earlier, install the @angular/cli package yourself by running npm install -g @angular/cli in the Terminal Alt+F12. When creating an application, select the folder where the @angular/cli package is stored.

Additional parameters

(Optional) Specify the extra ng new options to pass to Angular CLI.

Code completion is available in this field: as you start typing the name of an option or press Ctrl+Space, IntelliJ IDEA shows you the available options and their description.

Module nameSpecify the module name. By default, the project name is used.
Content rootSpecify the path to the module content root folder (the folder that stores your source code). It's recommended that you use the default path.
Module file locationSpecify the path to the folder where the .iml module file should be created. By default, this file is created in the module content root folder (recommended).
Project formatIt's recommended that you use the directory-based format.
Project nameSpecify the project name.
Project locationSpecify the path to the directory in which you want to create the project. By default, the IDE creates a directory with the same name as the project.
Node interpreter

Specify the Node.js interpreter that you want to use in this project. You can select a configured interpreter from the list or click Add to configure a new one.

If you have no Node.js on your computer, select Download Node.js from the list.

React Native

Select npx --package react-native-cli react-native.

Alternatively, for npm version 5.1 and earlier, install the react-native-cli package yourself by running npm install -g react-native-cli in the Terminal Alt+F12. When creating an application, select the folder where the react-native-cli package is stored.

Module nameSpecify the module name. By default, the project name is used.
Content rootSpecify the path to the module content root folder (the folder that stores your source code). It's recommended that you use the default path.
Module file locationSpecify the path to the folder where the .iml module file should be created. By default, this file is created in the module content root folder (recommended).
Project formatIt's recommended that you use the directory-based format.
Project nameSpecify the project name.
Project locationSpecify the path to the directory in which you want to create the project. By default, the IDE creates a directory with the same name as the project.
Node interpreter

In this field, specify the Node.js interpreter to use. This can be a local Node.js interpreter or a Node.js on Windows Subsystem for Linux..

Package managerSpecify the location of the Node.js package manager file npm.cmd. In most cases, IntelliJ IDEA detects the Node.js executable and fills in the field automatically.
Module nameSpecify the module name. By default, the project name is used.
Content rootSpecify the path to the module content root folder (the folder that stores your source code). It's recommended that you use the default path.
Module file locationSpecify the path to the folder where the .iml module file should be created. By default, this file is created in the module content root folder (recommended).
Project formatIt's recommended that you use the directory-based format.
Project nameSpecify the project name.
Project locationSpecify the path to the directory in which you want to create the project. By default, the IDE creates a directory with the same name as the project.
Node interpreter

In this field, specify the Node.js interpreter to use. This can be a local Node.js interpreter or a Node.js on Windows Subsystem for Linux..

Package managerSpecify the location of the Node.js package manager file npm.cmd. In most cases, IntelliJ IDEA detects the Node.js executable and fills in the field automatically.
VersionSelect the version of the template in accordance to which the stub will be generated. Click the Refresh button to refresh the list of available template versions..
View EngineSelect the template engine that you want to use.
Stylesheet EngineSelect the CSS preprocessor for your project.
Module nameSpecify the module name. By default, the project name is used.
Content rootSpecify the path to the module content root folder (the folder that stores your source code). It's recommended that you use the default path.
Module file locationSpecify the path to the folder where the .iml module file should be created. By default, this file is created in the module content root folder (recommended).
Project formatIt's recommended that you use the directory-based format.

Kotlin

During step 1, the global project properties are defined.

NameThe project name.
LocationThe path to the directory where the project will be located. If not specified, IntelliJ IDEA uses the default directory (Settings/Preferences | Appearance & Behavior | System settings).
Project Template

Defines the initial project structure. Depending on the purpose, select one of the following templates.

JVM:

  • Application (JVM): backend application with Kotlin/JVM.

  • Console Application: console application with Kotlin/JVM. Use it for prototyping or testing purposes.

Multiplatform:

  • Mobile Application: mobile applications for iOS and Android with Kotlin Multiplatform Mobile, which supports sharing common code between platforms.

  • Mobile Library: library that supports sharing code between iOS and Android.

  • Application (Multiplatform): applications for different platforms that support sharing common code.

  • Library: library for sharing common code among different platforms.

  • Native Application: application with Kotlin/Native that works as a standalone application under a specific platform.

  • Full-stack Web Application: full-fledged web application using Kotlin/JS for the frontend and Kotlin/JVM for the backend.

Kotlin/JS:

  • Frontend Application: frontend application with Kotlin/JS and non-Kotlin backend. If you use Kotlin for backend, the better option is Full-stack Web Application.

Build systemSelect the build tool that will be used for managing dependencies, testing, packaging, automating the build process, and so on.
Project JDK

The JDK that will be used in the project (version 1.8 or later is recommended). The JDK:

  • is essential for projects built with IntelliJ IDEA build system.

  • used for coding assistance in projects built with Gradle and Maven

If you don't have a JDK installed, you can download it right in the dialog.

Group IDThe unique identifier of your organization. Not applicable for IntelliJ build system.
Artifact IDThe unique name of the primary artifact for this project. Not applicable for IntelliJ build system.
VersionThe version of the primary artifact generated by the project. Not applicable for IntelliJ build system.
Kotlin RuntimeThe Kotlin Runtime library that will be used in the project. Only required for IntelliJ build system.

During step 2, the module structure of the project is configured. This step is optional.

Common settings

The settings in this section are applicable to all module types irrespective of the selected template.

NameThe name of the module.
Test frameworkThe framework that will be used for unit testing.
Module dependenciesThe list of modules the current module depends on.

Module templates

Module templates determine the initial module setup. Depending on the selected module template, modules may have different settings.

NoneA blank project with minimal initial configuration.
Console applicationConsole application with Kotlin/JVM. Use it for prototyping or testing purposes.
Web serverAsynchronous client/server application with Ktor. The Web server setting specifies the server engine that will be used: Netty, Tomcat, or Jetty.
Frontend application

Frontend application with Kotlin/JS. For this template, Rendering engine needs to be specified:

  • Statically-typed Kotlinx.html DSL: provides an easy way to write simple web applications without relying on a framework. It allows you to write typesafe HTML, but remains unopinionated about how your application should behave or render.

  • Kotlin-wrapped React library: allows you to leverage one of the most popular web frameworks, React, to build reactive web frontend in Kotlin. By using interoperability with JavaScript, you can also re-use third-party components in your application.

  • Kotlin-wrapped React library with Styled Components: in addition to allowing you to write reactive apps, also allows you to define your stylesheets in a typesafe Kotlin DSL. Styled-components make it easy to add (even dynamic) stylesheets to components in your React application.

Native applicationApplication with Kotlin/Native that works as a standalone application under a specific platform.

JVM-specific settings

The settings in this section are only applicable to JVM targets/modules.

Target JVM versionThe version of the JVM bytecode that will be produced as the result of compiling this module.
Java language supportAllows you to write Java code in the selected target

Android-specific settings

The settings in this section are only applicable to Android targets/modules.

Android pluginAndroid Gradle plugin that will be used for the current module.
Android SDKAndroid SDK that will be used for the current module.

JavaScript-specific settings

The settings in this section are only applicable to JavaScript targets/modules.

Target kindSpecifies what will be produced as the result of compiling this module/target: a JavaScript application or JavaScript library.
CSS supportEnables webpack loaders for styles and CSS. If you are using SASS or LESS, diable this option.

Web

Project nameSpecify the project name.
Project locationSpecify the path to the directory in which you want to create the project. By default, the IDE creates a directory with the same name as the project.
Module name

Specify the module name. By default, the project name is used.

For more information on modules and the difference between projects and modules, refer to Configure projects and Modules.

Content rootSpecify the path to the module content root folder (the folder that stores your source code). It's recommended that you use the default path.
Module file locationSpecify the path to the folder where the .iml module file should be created. By default, this file is created in the module content root folder (recommended).
Project formatIt's recommended that you use the directory-based format.

Empty Project

Empty projects are created without modules. For such projects, you need to manually create at least one module, add content roots, and configure an SDK.

Select Empty Project and click Next.

Creating a new empty project
Project nameSpecify the project name.
Project locationSpecify the path to the directory in which you want to create the project. By default, the IDE creates a directory with the same name as the project.
Project formatIt's recommended that you use the directory-based format.
Last modified: 15 September 2021