Import and export projects
This option imports the selected project to IntelliJ IDEA as is (opens it). If you want to set custom settings while importing the project (for example, select another SDK or choose the libraries that you want to import), refer to Create a project from existing sources.
Launch IntelliJ IDEA.
If the Welcome screen opens, click Open .
Otherwise, from the main menu, select File | Open .
In the dialog that opens, select the directory in which your sources, libraries, and other assets are located and click Open .
When you import or clone a project for the first time, IntelliJ IDEA analyzes it. If the IDE detects more than one configuration (for example, Eclipse and Gradle), it prompts you to select which configuration you want to use.
If the project that you are importing uses a build tool, such as Maven or Gradle, we recommend that you select the build tool configuration.
Select the necessary configuration and click OK .

The IDE pre-configures the project according to your choice. For example, if you select Gradle , IntelliJ IDEA executes its build scripts, loads dependencies, and so on.
If you have been working with another project, select whether you want to open the new project in a new dialog or in the current one.
For instructions on how to get a project from version control, refer to Check out a project from a remote host (clone).
Import a project with settings
This section describes the functionality that is available out of the box. If you are using a framework plugin, refer to the corresponding documentation section.
Import a project from an external model
Use this type of import if your project comes from an external model and you want to import it as a whole. In this case, IntelliJ IDEA interprets the project files (for example, your Eclipse project will be migrated to IntelliJ IDEA).
Launch IntelliJ IDEA.
If the Welcome screen opens, press Ctrl+Shift+A , type project from existing sources , and click the Import project from existing sources action in the popup.
Otherwise, from the main menu, select File | New | Project from Existing Sources .
In the dialog that opens, select the directory in which your sources, libraries, and other assets are located and click Open .
Select the external model that your project uses:
Gradle: select the necessary build tool and click Finish .
For Maven and Gradle projects, the IDE configures the settings automatically. You will be able to adjust them after the project is imported.
Create a project from existing sources
Use this type of import to create an IntelliJ IDEA project over the existing source code that is not necessarily an exported project.
Launch IntelliJ IDEA.
If the Welcome screen opens, press Ctrl+Shift+A , type project from existing sources , and click the Import project from existing sources action in the popup.
Otherwise, from the main menu, select File | New | Project from Existing Sources .
In the dialog that opens, select the directory in which your sources, libraries, and other assets are located and click Open .
Select the Create project from existing sources option and click Next .
Specify the name and location and select a format for the new project. It’s recommended that you use the directory-based format.
If you are importing the project to the same directory, the IDE asks you whether you want to overwrite it. If you click Yes , IntelliJ IDEA will overwrite the files in .idea directory and the .iml files, your source files will remain intact.
Select the directories that you want to use as source root directories (folders with your source code) and click Next .
Select the libraries that you want to add to the new project.
You can join several selected libraries or archives into a new library by clicking or split the selected library into two by clicking .
Review module structure: select the modules that you want to include in your project.
You can merge several modules into one by clicking or split the selected module into two by clicking .
Specify the SDK that you want to use.
If the necessary SDK is already defined in IntelliJ IDEA, select it from the list on the left. Otherwise, click and add a new SDK.
Enable support for the detected frameworks and technologies: select checkboxes next to the necessary items.
You can also specify how the files-indicators should be grouped: by type (by framework) or by directory (by location).
Export a project
You can save a project as a .zip archive or export it to Eclipse.
Save a project as a .zip file
The option to export a project to a .zip file is available if the Android bundled plugin is enabled.
From the main menu, select File | Export | Project to Zip File .
In the dialog that opens, specify the path to which you want to save the .zip file with the project and click Save .
Open, close, and move projects
From the main menu, select File and click Open or Recent Projects if you have worked with the project lately.
If you are opening a project for the first time, and this project has several configurations (for example Eclipse and Maven), the IDE will ask you which configuration to load. Refer to Open a project (simple import) for more information on how to open such a project correctly.
Open projects in a new or the same window
By default, when you launch the second of any subsequent project, the IDE asks you how you want to open it: in a new window or in the same window. You can configure the default behavior for such cases in the settings:
In the Settings dialog ( Ctrl+Alt+S ), select Appearance & Behavior | System Settings .
In the Project section, select the necessary Open project in option:
New window : open every project in a separate window.
Current window : close the current project and open the new one in the same window.
Ask : show a dialog with actions to choose from.
Apply the changes and close the dialog.
Always reopen projects
If you quit the IDE having multiple opened projects, they all will be reopened the next time you launch IntelliJ IDEA. If you don’t want to automatically reopen your projects, you can change this behavior in the settings:
In the Settings dialog ( Ctrl+Alt+S ), select Appearance & Behavior | System Settings .
In the Project section, clear the Reopen projects on startup checkbox.
Apply the changes and close the dialog.
Merge project windows (macOS)
On macOS, you can merge all opened project windows into one, turning them into tabs.
Make sure that there are several IntelliJ IDEA projects opened in separate windows.
From the main menu, select Window | Merge All Project Windows .
Drag a project’s tab to work with the project in a separate window again.
Navigate projects on the Welcome screen
If you work with multiple projects, it’s likely that you have a long list of recent projects on the Welcome screen. IntelliJ IDEA provides several options that can help navigate this list in a more convenient way.
You can use the search bar to search for projects, join several recent projects in a group, or set a custom icon for each project.
Group projects
Groups make navigation simpler and help you logically organize your recent projects.
On the Welcome screen, right-click any project and select New Project Group .
In the Create New Project Group dialog, name the new group and click OK .
Right-click the project that you want to move to the new group, select Move to Group , and click the target group’s name.
After that, hover the mouse pointer over the group and use the icon to show the menu from which you can open all projects in the group at once by clicking All Projects in Group . You can also ungroup the projects, move them to another group, and remove them from the list of recent projects at once.

Change the project icon
For each project, you can configure a custom icon so that you can quickly find the necessary project on the Welcome screen. Your custom icon should have the SVG format.
On the Welcome screen, right-click the project for which you want to change an image and select Change Project Icon .
In the dialog that opens, click Choose SVG file and specify the path to the necessary SVG icon.
Click OK to apply the changes.
To remove the custom icon, click in the Change Project Icon dialog.
Switch between projects
If you have several opened projects at the same time, you can switch between them using the following options:
Switch to the next project window: Ctrl+Alt+] ( Window | Next Project Window )
Switch to the previous project window: Ctrl+Alt+[ ( Window | Previous Project Window )
Alternatively, open the Window menu and select the project to which you want to switch.
Change project location
Move a project to another location
In the Project tool window Alt+1 , right-click the root directory of your project and select Refactor | Move directory ( F6 ).
In the dialog that opens, specify a new location for the project and click Refactor .
Change the default location for projects
In the Settings dialog ( Ctrl+Alt+S ), select Appearance & Behavior | System Settings .
In the Default project directory field, specify the path to the folder in which you want to store your projects.
Apply the changes and close the dialog.
Close projects
If you need to close only one project, you can either close the project window or select File | Close Project from the main menu.
If you work with multiple projects, use the following actions to close many projects at once:
Close all projects
From the main menu, select File | Close All Projects .
This action closes all projects that are currently opened in IntelliJ IDEA.
Как открыть проект в intellij idea

В прошлой теме мы рассмотрели, как создавать первую программу с последующим ее запуском в командной строке. Однако в реальности, как правило, крупные программы разрабатываются не при помощи простого текстового редактора, а с использованием таких средств как IDE или интегрированные среды разработки, которые упрощают и ускоряют написание кода и создание приложений. На данный момент одной из самых популярных сред разработки для Java является IntelliJ IDEA от компании JetBrains. Рассмотрим, как использовать данную среду.
Прежде всего загрузим установочный дистрибутив с официального сайта https://www.jetbrains.com/idea/download. По этому адресу можно найти пакеты для Windows, MacOS, Linux. Кроме того, сама среда доступна в двух версиях — Ultimate (платная с триальным бесплатным периодом) и Community (бесплатная). В данном случае выберем бесплатную версию Community .

Конечно, Community-версия не имеет ряда многих возможностей, которые доступны в Ultimate-версии (в частности, в Community недоступны опции для веб-приложений на Java). Но Community-версия тоже довольно функциональна и тоже позволяет делать довольно много, в том числе приложения на JavaFX и Android.
После установки запустим IntelliJ IDEA и создадим первый проект. Для этого на стартовом экране выберем New Project :

Далее откроется окно создания проекта. В левой части в качестве типа проекта выберем Java.

В поле Name укажем имя проекта. В моем случае проект будет называться HelloApp.
В поле Location можно указать путь к проекту, если не устраивает путь по умолчанию.
Поскольку мы будем работать с языком Java, в поле Language выберем пункт Java
Кроме того, в поле JDK можно указать путь к Java SDK, который будет использоваться в проекте. Как правило, это поле по умолчанию уже содержит путь к JDK, который установлен на локальном компьютере. Если это поле пусто, то его надо установить.
После этого нажмем на кнопку Create. После этого среда создаст и откроет проект.

В левой части мы можем увидеть структуру проекта. Все файлы с исходным кодом помещаются в папку src . По умолчанию эта папка пуста, никаких файлов кода у нас в проекте пока нет. Поэтому добавим файл с исходным кодом. Для этого нажмем на папку src правой кнопкой мыши и в контекстном меню выберем пункт New -> Java Class :

После этого нам откроется небольшое окошко, в которое надо ввести имя класса. Пусть класс будет называться Program :

После нажатия на клавишу Enter в папку src будет добавлен новый файл с классом java (в случае выше класс Program). А в центральной части откроется его содержимое — собственно исходный код:

Изменим код класса следующим образом:
С помощью зеленой стрелки на панели инструментов или через меню Run -> Run. запустим проект.

И внизу IntelliJ IDEA отобразится окно вывода, где мы можем увидеть результат работы нашей программы.
Как поместить проект из архива в среду intellij idea?
![]()
Для начала, проект, который упакован в архив, надо распаковать в какое то удобное место. Для IDEA таким местом может быть папка с проектами этой IDE назначенная ей по умолчанию. Далее:
Если этот проект ранее был подготовлен в среде IntelliJ IDEA, то просто открываете его (если в IDE открыт другой проект):
То же самое можно сделать и со стартового экрана IDEA, когда никакой проект еще не открыт: 3-тий пункт — Open:
В появившемся окне указываете путь до корневой папки проекта.
- Если проект подготовлен в другой IDE (написан в блокноте), его надо импортировать, чтобы IDEA могла создать свои рабочие файлы и каталоги:
File -> New -> Project from Existing Sources ..
На стартовом экране это второй пункт — Import Project
В появившемся окне необходимо указать путь до корневой папки проекта. Далее следовать указаниям мастера, так как в зависимости от того, на чем основан проект (Maven, gradle, ant и тд.) требуются разные действия.