# Add items to your project

Once you have created a project, you can start adding new items: [create
directories](#new-directory) and  [packages](#new-package), add [new classes](#new-java-class), [import resources](#import-items), and extend your project by [adding more modules](#create-module).

## Create new items

Procedure: Create a new directory

1. In the   Project tool window  (`Alt+1` (Windows), `⌘ 1` (macOS), `⌘ 1` (IntelliJ IDEA Classic (macOS)), `⌘ 1` (macOS System Shortcuts), `Alt+1` (XWin), `Alt+1` (GNOME), `Alt+1` (KDE), `Alt+1` (Emacs), `Alt+1` (Sublime Text), `⌘ 1` (Sublime Text (macOS)), `Ctrl+1` (NetBeans), `Ctrl+Alt+L` (Visual Studio), `⌘ ⌥ L` (Visual Studio (macOS)), `Alt+1` (Eclipse), `Alt+1` (Eclipse (macOS))) , right-click the node in which you want to create a new directory   and select `New | Directory`.

Alternatively, select the node and click ![](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.add.svg) on the toolbar or press `Alt+Insert` (Windows), `⌘ N` (macOS), `⌃ N` (IntelliJ IDEA Classic (macOS)), `⌘ N` (macOS System Shortcuts), `Alt+Insert` (XWin), `Alt+Insert` (GNOME), `Alt+Insert` (KDE), `Alt+Insert` (Emacs), `Ctrl+N` (Sublime Text), `⌘ N` (Sublime Text (macOS)), `Alt+Insert` (NetBeans), `Ctrl+N` (Visual Studio), `⌘ N` (Visual Studio (macOS)), `Alt+Insert` (Eclipse), `⌘ N` (Eclipse (macOS)). Then select Directory.

2. Name the new directory and press `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `Enter` (NetBeans), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (Eclipse), `⏎` (Eclipse (macOS)).

> **Tip:**
> If you want to create several nested directories, specify their names separated with slashes, for example: `folder/resources`.

![Creating a new directory](https://resources.jetbrains.com.cn/help/img/idea/2026.2/create-new-dir.png)

Procedure: Create a new package

Packages in Java are used for grouping classes that belong to the same category or provide similar functionality for structuring and organizing large applications with hundreds of classes.

1. In the Project tool window (`Alt+1` (Windows), `⌘ 1` (macOS), `⌘ 1` (IntelliJ IDEA Classic (macOS)), `⌘ 1` (macOS System Shortcuts), `Alt+1` (XWin), `Alt+1` (GNOME), `Alt+1` (KDE), `Alt+1` (Emacs), `Alt+1` (Sublime Text), `⌘ 1` (Sublime Text (macOS)), `Ctrl+1` (NetBeans), `Ctrl+Alt+L` (Visual Studio), `⌘ ⌥ L` (Visual Studio (macOS)), `Alt+1` (Eclipse), `Alt+1` (Eclipse (macOS))), right-click the node within the [Sources Root](content-roots.html#folder-categories) ![the Sources root icon](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app-client.expui.nodes.sourceRoot.svg) or [Test Sources Root](content-roots.html#folder-categories) ![the Test Sources root](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app-client.expui.nodes.testRoot.svg) in which you want to create a new package, and click `New | Package`.

Alternatively, select the node and click ![](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.add.svg) on the toolbar or press `Alt+Insert` (Windows), `⌘ N` (macOS), `⌃ N` (IntelliJ IDEA Classic (macOS)), `⌘ N` (macOS System Shortcuts), `Alt+Insert` (XWin), `Alt+Insert` (GNOME), `Alt+Insert` (KDE), `Alt+Insert` (Emacs), `Ctrl+N` (Sublime Text), `⌘ N` (Sublime Text (macOS)), `Alt+Insert` (NetBeans), `Ctrl+N` (Visual Studio), `⌘ N` (Visual Studio (macOS)), `Alt+Insert` (Eclipse), `⌘ N` (Eclipse (macOS)). Then select Package.

2. Name the new package and press `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `Enter` (NetBeans), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (Eclipse), `⏎` (Eclipse (macOS)).

Write package names in lowercase letters. There are some other [naming conventions](https://www.oracle.com/technetwork/java/codeconventions-135099.html) for packages in Java that you should follow.

![Creating a new Java package](https://resources.jetbrains.com.cn/help/img/idea/2026.2/create-new-package.png)

> **Tip:**
> To assign a custom shortcut for creating new packages and directories, look for the Create new directory or package action under `Main Menu | File | File Open Actions | Open Project Actions | New` on  the Keymap settings page `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) .
>
>
>
> Learn about custom shortcuts from [Add a keyboard shortcut](configuring-keyboard-and-mouse-shortcuts.html#add-keyboard-shortcut).

Procedure: Create a new empty file

1. In the   Project tool window  (`Alt+1` (Windows), `⌘ 1` (macOS), `⌘ 1` (IntelliJ IDEA Classic (macOS)), `⌘ 1` (macOS System Shortcuts), `Alt+1` (XWin), `Alt+1` (GNOME), `Alt+1` (KDE), `Alt+1` (Emacs), `Alt+1` (Sublime Text), `⌘ 1` (Sublime Text (macOS)), `Ctrl+1` (NetBeans), `Ctrl+Alt+L` (Visual Studio), `⌘ ⌥ L` (Visual Studio (macOS)), `Alt+1` (Eclipse), `Alt+1` (Eclipse (macOS))) , right-click the node in which you want to create a new file   and click `New | File`.

Alternatively, select the node and click ![](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.add.svg) on the toolbar or press `Alt+Insert` (Windows), `⌘ N` (macOS), `⌃ N` (IntelliJ IDEA Classic (macOS)), `⌘ N` (macOS System Shortcuts), `Alt+Insert` (XWin), `Alt+Insert` (GNOME), `Alt+Insert` (KDE), `Alt+Insert` (Emacs), `Ctrl+N` (Sublime Text), `⌘ N` (Sublime Text (macOS)), `Alt+Insert` (NetBeans), `Ctrl+N` (Visual Studio), `⌘ N` (Visual Studio (macOS)), `Alt+Insert` (Eclipse), `⌘ N` (Eclipse (macOS)). Then select File.

2. Name the new file and specify its extension, for example: `File.js` , and press `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `Enter` (NetBeans), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (Eclipse), `⏎` (Eclipse (macOS)).

If the extension you have specified is not associated with any of the file types recognized by IntelliJ IDEA, the [Register New File Type Association](creating-and-registering-file-types.html#register-new-association) dialog is displayed. In this dialog, you can associate the extension with one of the recognized file types.

Procedure: Create a new Java class

1. In the Project tool window (`Alt+1` (Windows), `⌘ 1` (macOS), `⌘ 1` (IntelliJ IDEA Classic (macOS)), `⌘ 1` (macOS System Shortcuts), `Alt+1` (XWin), `Alt+1` (GNOME), `Alt+1` (KDE), `Alt+1` (Emacs), `Alt+1` (Sublime Text), `⌘ 1` (Sublime Text (macOS)), `Ctrl+1` (NetBeans), `Ctrl+Alt+L` (Visual Studio), `⌘ ⌥ L` (Visual Studio (macOS)), `Alt+1` (Eclipse), `Alt+1` (Eclipse (macOS))), right-click the node in which you want to create a new class and select `New | Java Class`.

Alternatively, select the node and click ![](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.add.svg) on the toolbar or press `Alt+Insert` (Windows), `⌘ N` (macOS), `⌃ N` (IntelliJ IDEA Classic (macOS)), `⌘ N` (macOS System Shortcuts), `Alt+Insert` (XWin), `Alt+Insert` (GNOME), `Alt+Insert` (KDE), `Alt+Insert` (Emacs), `Ctrl+N` (Sublime Text), `⌘ N` (Sublime Text (macOS)), `Alt+Insert` (NetBeans), `Ctrl+N` (Visual Studio), `⌘ N` (Visual Studio (macOS)), `Alt+Insert` (Eclipse), `⌘ N` (Eclipse (macOS)). Then select Java Class.

2. Name the new class and press `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `Enter` (NetBeans), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (Eclipse), `⏎` (Eclipse (macOS)).

Follow the Java [naming convention](https://www.oracle.com/technetwork/java/codeconventions-135099.html) as you create new classes.

[Video](https://resources.jetbrains.com.cn/help/img/idea/2026.2/create-class.mp4)

Together with the file, IntelliJ IDEA automatically generates the class declaration.

This is done by means of file templates. Depending on the type of the file that you create, the IDE inserts initial code and formatting that is expected to be in all files of that type. For more information about how to use and configure templates, refer to [File templates](using-file-and-code-templates.html).

> **Tip:**
> You can create a class together with a package. To do so, press `Alt+Insert` (Windows), `⌘ N` (macOS), `⌃ N` (IntelliJ IDEA Classic (macOS)), `⌘ N` (macOS System Shortcuts), `Alt+Insert` (XWin), `Alt+Insert` (GNOME), `Alt+Insert` (KDE), `Alt+Insert` (Emacs), `Ctrl+N` (Sublime Text), `⌘ N` (Sublime Text (macOS)), `Alt+Insert` (NetBeans), `Ctrl+N` (Visual Studio), `⌘ N` (Visual Studio (macOS)), `Alt+Insert` (Eclipse), `⌘ N` (Eclipse (macOS)) in the Project tool window, select Java Class, and specify the fully qualified name of the class, for example: `com.example.helloworld.HelloWorld`.

Procedure: Create a new module

Modules allow you to combine several technologies and frameworks in one application. In IntelliJ IDEA, you can create several modules in one project and each of them can be responsible for its own framework.

1. Select the top-level directory in the Project tool window. Click ![](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.add.svg) on the toolbar or press `Alt+Insert` (Windows), `⌘ N` (macOS), `⌃ N` (IntelliJ IDEA Classic (macOS)), `⌘ N` (macOS System Shortcuts), `Alt+Insert` (XWin), `Alt+Insert` (GNOME), `Alt+Insert` (KDE), `Alt+Insert` (Emacs), `Ctrl+N` (Sublime Text), `⌘ N` (Sublime Text (macOS)), `Alt+Insert` (NetBeans), `Ctrl+N` (Visual Studio), `⌘ N` (Visual Studio (macOS)), `Alt+Insert` (Eclipse), `⌘ N` (Eclipse (macOS)). Then select Module.

The New Module wizard opens.

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

If you want to use a language that is not available in IntelliJ IDEA out of the box (for example, Python or PHP), click More via plugins and select the necessary option.

The IDE will open a dialog in which you can select and install the necessary language plugin. After that, you can close the dialog and keep configuring the new project.

3. Name the new module.

4. Select the build system that you want to use in your project: the native IntelliJ builder, [Maven](maven-support.html), or [Gradle](gradle.html).

For Gradle, you will also need to select a language for the build script: Groovy or Kotlin.

5. Select a [JDK](sdk.html) that you want to use from the JDK list. You can use the project SDK or specify a new one.

6. Click Create.

[Video](https://resources.jetbrains.com.cn/help/img/idea/2026.2/adding-new-module.mp4)

For more information about modules in IntelliJ IDEA, refer to [Modules](creating-and-managing-modules.html).

Procedure: Customize the New File or Directory menu

1. Press `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) to open settings and then select `Appearance & Behavior | Menus and Toolbars`.

2. Start typing `new` in the right search bar.

3. Reorder or remove items as you want them to appear in the New File or Directory menu and confirm the changes.

![Customizing the New File or Directory menu](https://resources.jetbrains.com.cn/help/img/idea/2026.2/ij_customize_new_file_menu.gif)

## Import items

Procedure: Import files

You can import files to your project using any of the following ways:

* Drag the file from your system file manager to the necessary node  in the   Project tool window  (`Alt+1` (Windows), `⌘ 1` (macOS), `⌘ 1` (IntelliJ IDEA Classic (macOS)), `⌘ 1` (macOS System Shortcuts), `Alt+1` (XWin), `Alt+1` (GNOME), `Alt+1` (KDE), `Alt+1` (Emacs), `Alt+1` (Sublime Text), `⌘ 1` (Sublime Text (macOS)), `Ctrl+1` (NetBeans), `Ctrl+Alt+L` (Visual Studio), `⌘ ⌥ L` (Visual Studio (macOS)), `Alt+1` (Eclipse), `Alt+1` (Eclipse (macOS))) .

* Copy the file in the system file manager by pressing `Ctrl+C` (Windows), `⌘ C` (macOS), `⌘ C` (IntelliJ IDEA Classic (macOS)), `⌘ C` (macOS System Shortcuts), `Ctrl+C` (XWin), `Ctrl+C` (GNOME), `Ctrl+C` (KDE), `Ctrl+Insert` (Emacs), `Ctrl+C` (Sublime Text), `⌘ C` (Sublime Text (macOS)), `Ctrl+C` (NetBeans), `Ctrl+C` (Visual Studio), `⌘ C` (Visual Studio (macOS)), `Ctrl+C` (Eclipse), `⌘ C` (Eclipse (macOS)) and then paste in to the necessary node in the IDE  Project tool window  by pressing `Ctrl+V` (Windows), `⌘ V` (macOS), `⌘ V` (IntelliJ IDEA Classic (macOS)), `⌘ V` (macOS System Shortcuts), `Ctrl+V` (XWin), `Ctrl+V` (GNOME), `Ctrl+V` (KDE), `Shift+Insert` (Emacs), `Ctrl+Shift+V` (Sublime Text), `⌘ ⇧ V` (Sublime Text (macOS)), `Ctrl+V` (NetBeans), `Ctrl+V` (Visual Studio), `⌘ V` (Visual Studio (macOS)), `Ctrl+V` (Eclipse), `⌘ V` (Eclipse (macOS)).

* Manually move the file to the project folder in your system file manager.

Procedure: Import folders

* To import a folder to your current project, drag the folder from your system file manager to the   Project tool window  (`Alt+1` (Windows), `⌘ 1` (macOS), `⌘ 1` (IntelliJ IDEA Classic (macOS)), `⌘ 1` (macOS System Shortcuts), `Alt+1` (XWin), `Alt+1` (GNOME), `Alt+1` (KDE), `Alt+1` (Emacs), `Alt+1` (Sublime Text), `⌘ 1` (Sublime Text (macOS)), `Ctrl+1` (NetBeans), `Ctrl+Alt+L` (Visual Studio), `⌘ ⌥ L` (Visual Studio (macOS)), `Alt+1` (Eclipse), `Alt+1` (Eclipse (macOS))) .

Procedure: Import an existing module

You can import a module to your project by adding the `.iml` file from another project:

1. In the main menu, go to `File | New | Module from Existing Sources`.

2. In the dialog that opens, specify the path the `.iml` file of the module that you want to import, and click Open.

By doing so, you are attaching another module to the project without physically moving any files. If you don't need the modules to be located in one folder, the module import is finished, and you can start working with the project normally.

> **Tip:**
> If you want the modules in the same folder, in the Project tool window, drag the imported module to the top-level directory. In this case, the contents of the imported module will be physically transferred to your project's folder.

For more information about modules in IntelliJ IDEA, refer to [Modules](creating-and-managing-modules.html).

## See also

### Procedures

[Modules in IntelliJ IDEA](creating-and-managing-modules.html) [Create your first Java application](creating-and-running-your-first-java-application.html)

