JavaRush /Java Blog /Random EN /Creating a Project in IntelliJ IDEA

Creating a Project in IntelliJ IDEA

Published in the Random EN group
IntelliJ IDEA and similar development environments are one of the first tools that a novice programmer needs to master. In this material we will look at installing and configuring the software, as well as the procedure for creating a project in IntelliJ IDEA. Creating a project in IntelliJ IDEA - 1

What is IntelliJ IDEA

IntelliJ IDEA is an integrated development environment for Java applications from JetBrains. It is positioned as the smartest and most convenient development environment for Java with support for all the latest technologies and frameworks. IntelliJ IDEA is one of the top three most popular IDEs for Java along with Eclipse IDE and NetBeans IDE. There is a comparison of three development environments in this material on choosing a development environment. IntelliJ IDEA is very familiar to the Javarush community. Already from the third level, students complete assignments in IntelliJ IDEA, which easily integrates with the course. Course students receive practical assignments directly in the development environment. In it, the student can submit the completed assignment for review and immediately receive feedback.
To see how everything works, you need to have an account on JavaRush - an online course for learning Java programming with an emphasis on practice: 1200+ tasks with instant verification, mini-projects, task-games, hundreds of lectures on the basics of Java.
Creating a project in IntelliJ IDEA - 2Although IntelliJ IDEA is known as a development environment for Java, it supports several programming languages ​​out of the box. In addition, IntelliJ IDEA is integrated with a number of modern frameworks . All popular version control systems and application build systems are built into this development environment. IDEA supports many application servers. Since version 6, IntelliJ IDEA provides integrated tools for graphical user interface development. This development environment has powerful analytical capabilities. Thanks to them, this IDE prompts the developer on the fly about the best code options in the current context. IDEA has a set of tools for refactoring existing code and quickly writing boilerplate designs.

IntelliJ IDEA Terms of Use

The first version of IntelliJ IDEA appeared in January 2001, and since then JetBrains has been adding new features and improving existing ones. Starting with version 9.0, IntelliJ IDEA is available in two flavors:
  • Community Edition
  • Ultimate Edition
Community Edition is a free version under the Apache 2.0 license. It is designed for JVM and Android development, as well as GUI applications. It will be useful for both novice developers for educational purposes and professionals for commercial development. The Ultimate Edition is available under a commercial license and supports more tools than the Community Edition. This version of the application is intended for enterprise and web development. It is useful for backend and frontend developers. IntelliJ IDEA comes for three platforms: Windows, macOS, Linux. The current version of the product can be downloaded from the official JetBrains website . As of June 2019, the current version is 2019.1.3. Below is a table showing the differences between the Ultimate Edition and Community Edition.
Only supported in Ultimate Edition Supported in Community Edition and Ultimate Edition
Language support
  • JavaScript
  • TypeScript
  • SQL
  • CSS, LESS, Sass, Stylus
  • CoffeeScript
  • ActionScript
  • XSL, XPath
  • Ruby, JRuby (via plugin)
  • PHP (via plugin)
  • Go (via plugin)
  • Java
  • Groovy
  • Kotlin
  • Scala (via plugin)
  • Python, Jython (via plugin)
  • Dart (via plugin)
  • Erlang (via plugin)
  • XML, JSON, YAML
  • AsciiDoc, Markdown (via plugins)
Framework support
  • Spring (Spring MVC, Spring Boot, Spring Integration, Spring Security and others)
  • Java EE (JSF, JAX-RS, CDI, JPA, etc)
  • Grails
  • GWT, Vaadin
  • Play (via plugin)
  • Thymeleaf, Freemarker, Velocity, Tapestry
  • Struts, AspectJ, JBoss Seam, OSGI
  • React
  • AngularJS (via plugin)
  • Node.js (via plugin)
  • Apache Flex, Adobe AIR
  • Rails, Ruby Motion (via plugin)
  • Django, Flask, Pyramid (via plugin)
  • Drupal, Wordpress, Laravel (via plugin)
  • Android (includes Android Studio functionality)
  • Swing (incl. UI Designer)
  • JavaFX
Version control system support:
  • Team Foundation Server
  • Perforce
  • Git, GitHub
  • Subversion
  • Mercurial
  • CVS
Deployment tool support:
  • Tomcat
  • TomEE
  • Google App Engine and other clouds (via plugins)
  • GlassFish
  • JBoss, WildFly
  • WebLogic
  • WebSphere, Liberty
  • Geronimo
  • Resin
  • Jetty
  • Virgo
  • Kubernetes (via plugin)
  • Docker, Docker Compose
Application build system support:
  • NPM (via plugin)
  • Webpack
  • Gulp
  • Grunt
  • Maven
  • Gradle
  • SBT
  • Ant
  • Gant
  • Ivy (via plugin)
Other:
  • Database Tools
  • Diagrams (UML, Dependencies, etc.)
  • Dependency Structure Matrix
  • Detecting Duplicates
  • Settings synchronization via JetBrains Account
  • REST Client
  • Darcula (dark theme)
  • Debugger
  • Decompiler
  • Bytecode Viewer
  • Unit Tests Runner (JUnit, TestNG, Spock; Cucumber, ScalaTest, spec2, etc)
  • Integration with bug tracking systems (YouTrack, JIRA, GitHub, TFS, Lighthouse, Pivotal Tracker, Redmine, Trac, etc.)
User support:
  • 24/7 support
  • Bug tracking system and forums

Advantages of InteliJ IDEA

This IDE helps maximize developer productivity. Concern for the ergonomics of the development environment can be seen in every aspect. The environment interface is designed so that most of the time the developer sees only the code editor: Creating a project in IntelliJ IDEA - 3Buttons that activate additional tools are located on the side and bottom panels of the screen. Each tool can be quickly shown or hidden: Creating a project in IntelliJ IDEA - 4In IntelliJ IDEA, almost every action can be performed through a specific keyboard shortcut. The developer can assign new and change old keyboard shortcuts for frequent actions. In the IntelliJ IDEA interface, every tree structure, list or pop-up window, be it a project tree or a development environment settings window, has navigation and search. All you have to do is focus on the right place and start typing the text you are looking for: Creating a project in IntelliJ IDEA - 5IntelliJ IDEA is convenient for writing code and debugging it. The IDEA debugger shows variable values ​​directly in the code. And every time a variable changes its value, it is highlighted by the debugger: Creating a project in IntelliJ IDEA - 6There are several skins in the development environment. By default, two themes are available - light and dark. Starting from version 2019.1, themes can be customized and new ones can be uploaded through the plugin: Creating a project in IntelliJ IDEA - 7Creating a project in IntelliJ IDEA - 8Creating a project in IntelliJ IDEA - 9

Tools for working with code in IntelliJ IDEA

IntelliJ IDEA has many tools for working with code. Let's give examples of some of them. Using the Live Templates tool , the developer significantly reduces the time spent writing frequently used code structures. For example, to create a main method, just type psvm in the editor and press the TAB key: Creating a project in IntelliJ IDEA - 10-> tab -> Creating a project in IntelliJ IDEA - 11IntelliJ IDEA indexes and analyzes the entire project, so it can instantly find the classes, methods and files the developer needs at any time. IDEA implements several searches, including:
  • Search for a class by name
  • Search for a file or directory by name
  • Search by project
  • Search by module
  • Search by directory
  • Search by area, among:
    • project files
    • test project files
    • open files
    • recently viewed files
    • recently modified files
    • etc.
Also, thanks to indexing and analysis of the entire project, the autocomplete that is familiar to developers becomes several levels more intelligent. Smart completion (Ctrl+Shift+Space) gives the programmer a list of the most relevant code options applicable to a given context: Creating a project in IntelliJ IDEA - 12Chain Completion (Ctrl+Shift+Double Space) conducts a deeper analysis of the current situation and suggests using class or variable methods for the current context: Creating a project in IntelliJ IDEA - 13Function Static Completion provides a list of static fields and methods applicable in a given context. Working in IDEA, the programmer does not need to think about imports. The development environment imports the necessary packages and removes unnecessary packages from the list of imported packages on the fly. Among other things, IntelliJ IDEA provides the developer with powerful refactoring tools to quickly refactor a program's source code. All this is a small part of the tools that IntelliJ IDEA offers a developer to work with code.

Development Environment Disadvantages

All of the above are advantages of IntelliJ IDEA. However, like any software product, it also has its disadvantages. IntelliJ IDEA has been in development since 2001. This large software product has a large amount of source code. As a result, when working with IDEA you can stumble upon bugs. IntelliJ IDEA is resource intensive. By default, it allocates up to 512 MB on x86 and up to 768 MB on x64. But sometimes, for example, with a major refactoring, even this may not be enough. It is worth saying that these values ​​can be increased. However, IDEA will consume even more system resources. When working with large files, for example, with classes of several thousand lines of code, IDEA can noticeably slow down. JetBrains regularly releases updates to IntelliJ IDEA. Very rarely, when updating IDEA, something can break.

Creating a Project in IntelliJ IDEA

To create a project, you need to click on the menu File -> New -> Project... Creating a project in IntelliJ IDEA - 14Next, in the window that opens, you need to select the project type. IntelliJ IDEA supports several - select Maven in the left side menu. In the Project SDK item, select the preinstalled version of the JDK and click the Next button. Creating a project in IntelliJ IDEA - 15In the next window we need to define the GroupId and ArtifactId for our Maven project. In the Version field, leave the default value - 1.0-SNAPSHOT. Creating a project in IntelliJ IDEA - 16In the next window, we just need to define the project name and its location in the file system. In our case, the values ​​suggested by IntelliJ IDEA are suitable: Creating a project in IntelliJ IDEA - 17Everything is ready - our project has been created. Creating a project in IntelliJ IDEA - 18
Comments
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION