![]() ![]() Manually move the file to the project folder in your system file manager. You can import files to your project using any of the following ways:ĭrag the file from your system file manager to the necessary node in the Project tool window ( Alt+1).Ĭopy the file in the system file manager by pressing Ctrl+C and then paste in to the necessary node in the IDE Project tool window by pressing Ctrl+V. ![]() You can use the project SDK or specify a new one.įor more information on modules in IntelliJ IDEA, refer to Modules. Select a JDK that you want to use from the JDK list. Select the build system that you want to use in your project: the native IntelliJ builder, Maven, or Gradle.įor Gradle, you will also need to select a language for the build script: Groovy or Kotlin. After that, you can close the dialog and keep configuring the new module. The IDE will open a dialog in which you can select and install the necessary language plugin. If you want to use a language that is not available in IntelliJ IDEA out of the box (for example, Python or PHP), click the button and select the necessary option. Name the new module.įrom the Language list, select the language that you want to use in your application. ![]() Select the top-level directory in the Project tool window and press Alt+Insert or select New | Module from the context menu.įrom the list on the left, select a module type. In IntelliJ IDEA, you can create several modules in one project and each of them can be responsible for its own framework. Modules allow you to combine several technologies and frameworks in one application. For more information, refer to Create a package and a class. To do so, press Alt+Insert in the Project tool window, select Java Class, and specify the fully qualified name of the class, for example:. You can create a class together with a package. For more information on how to use and configure templates, refer to 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. ![]() Together with the file, IntelliJ IDEA automatically generates the class declaration. In the Project tool window ( Alt+1), right-click the node in which you want to create a new class and select New | Java Class.Īlternatively, select the node, press Alt+Insert, and select Java Class.įollow the Java naming convention as you create new classes. In this dialog, you can associate the extension with one of the recognized file types. 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 dialog is displayed. Name the new file and specify its extension, for example: File.js, and press Enter. In the Project tool window ( Alt+1), right-click the node in which you want to create a new file and click New | File.Īlternatively, select the node, press Alt+Insert, and click File. There are some other naming conventions for packages in Java that you should follow. Write package names in lowercase letters. In the Project tool window ( Alt+1), right-click the node within the Sources Root or Test Sources Root in which you want to create a new package, and click New | Package.Īlternatively, select the node, press Alt+Insert, and click 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. If you want to create several nested directories, specify their names separated with slashes, for example: folder/new-folder. In the Project tool window ( Alt+1), right-click the node in which you want to create a new directory and select New | Directory.Īlternatively, select the node, press Alt+Insert, and click Directory. Once you have created a project, you can start adding new items: create directories and packages, add new classes, import resources, and extend your project by adding more modules. ![]()
0 Comments
Leave a Reply. |