Creating a New Java Project with IntelliJ IDEA | Scribe

    Creating a New Java Project with IntelliJ IDEA

    • Hafeez Baig |
    • 14 steps |
    • 26 seconds
    information ordinal icon
    Refer to this guide to learn how to download and install the IntelliJ IDEA<https://scribehow.com/shared/Installing_IntelliJ_IDEA_in_MacOS__VOfb78eQQTeB0tFY9ENIhg>
    1
    Search and click on the **IntelliJ IDEA CE**
    information ordinal icon
    **What is IntelliJ IDEA CE?** IntelliJ IDEA CE (Community Edition) is the free, open-source version of the IntelliJ IDEA integrated development environment (IDE) developed by JetBrains. It is primarily focused on Java, Kotlin, and basic programming needs, offering essential features
    2
    **IntelliJ IDEA** wizard will open, here you can view all of your projects
    3
    Click on the **New Project** on the right side
    4
    Give the Name as "**my-first-project**"
    5
    Click the **Location** option, here you can change and set the location for the Java Project
    6
    **OPTIONAL** - Click on the **Create Git repository** checkbox if you want to create a Git Repository
    information ordinal icon
    **What is Git and what is a Git repository?** Git is a distributed version control system used to track changes in code and collaborate on projects efficiently. A Git repository is a storage space, either local or remote, that contains the project files and their complete history. It allows developers to manage code versions, branch out, and merge changes seamlessly. Git ensures efficient collaboration and backups.
    information ordinal icon
    **What is the benefit of selecting the "Create Git Repository" checkbox?** Selecting the "Create Git Repository" checkbox initializes a local Git repository for the project. This enables version control from the start, allowing you to track changes, manage branches, and collaborate effectively. It also prepares the project for easy integration with remote repositories like GitHub or GitLab for sharing and backup.
    7
    Click on the **IntelliJ** option from the **Build system** section
    information ordinal icon
    **What are IntelliJ, Gradle, and Maven build systems?** - **IntelliJ IDEA:** A powerful IDE (Integrated Development Environment) for Java and other languages, offering code completion, debugging, version control integration, and tools for building and deploying applications. - **Gradle:** A modern build automation tool known for its flexibility, efficiency, and support for both Java and Kotlin DSLs. It excels in managing dependencies, compiling code, and automating the build process with advanced configurations. - **Maven:** A popular build automation and dependency management tool for Java projects, focusing on a declarative XML-based configuration. It uses a convention-over-configuration approach to simplify project setup and dependency management.
    8
    Click on the **JDK** dropdown and here you can select the JDK version for your java project **Note:** You can download the JDK directly from the IDE. Click on **Download JDK** in the configuration window, and select the version (e.g., JDK 17) and a distribution (like JetBrains Runtime). IntelliJ will handle the installation and configuration automatically.
    information ordinal icon
    **Tip:** You can also download JDK 17 from[Oracle](https://www.oracle.com/java/technologies/downloads/). Once installed, go back to IntelliJ and click **Add JDK** to set its path. This ensures your Java project compiles and runs smoothly.
    9
    Click on the **Add sample** **code** checkbox, if you want to add a sample code in your java project
    10
    **OPTIONAL** - Click on the "**Advanced Settings**" option
    11
    Here you can modify and configure more options for your java project
    12
    Click on the **Create** button
    13
    The Java project has been successfully created and includes the sample code.
    14
    On the right side you can view the code editor.