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 consider 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 Java IDEs along with Eclipse IDE and NetBeans IDE. A comparison of the three development environments is in this material on choosing a development environment. IntelliJ IDEA is well known to the Javarush community. Already from the third level, students complete tasks in IntelliJ IDEA, which is easily integrated with the course. Course students receive practical tasks right in the development environment. In it, the student can send the completed task for verification and immediately receive feedback.
To see how everything works, you need to have an account on CodeGym - an online course for learning Java programming with an emphasis on practice: 1200+ problems with instant verification, mini-projects, game problems, 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 . All popular version control systems and application build systems are built into this development environment. IDEA has support for many application servers. Starting with version 6, IntelliJ IDEA provides an integrated GUI development toolkit. This development environment has powerful analytical capabilities. Thanks to them, this IDE prompts the developer on the fly for the best code options in the current context. IDEA has a set of tools for refactoring existing code and quickly writing boilerplate constructs.

IntelliJ IDEA Terms of Service

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 intended 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 is available for three platforms: Windows, macOS, Linux. The current version of the product can be downloaded from the JetBrains official website . As of June 2019, the current version is 2019.1.3. Below is a table showing the differences between Ultimate Edition and Community Edition.
Supported in Ultimate Edition only 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
Support for version control systems:
  • 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
Support for application build systems:
  • 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:
  • Support 24/7
  • Bug tracking system and forums

Benefits of InteliJ IDEA

This IDE helps to maximize developer efficiency. Care for the ergonomics of the development environment can be traced in every aspect. The interface of the environment 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, each tree structure, list box, or pop-up window, whether it's the project tree or the development environment settings window, has navigation and search. It is enough to focus on the right place and start typing the text you are looking for: Creating a project in IntelliJ IDEA - 5IntelliJ IDEA is convenient when writing code and debugging it. The IDEA debugger shows the values ​​of variables directly in the code. And every time the variable changes its value, it is highlighted by the debugger: Creating a project in IntelliJ IDEA - 6The development environment has several themes. By default, two themes are available - light and dark. Starting from version 2019.1, themes can be customized and new ones can be uploaded via the plugin: Creating a project in IntelliJ IDEA - 7Creating a project in IntelliJ IDEA - 8Creating a project in IntelliJ IDEA - 9

Code Tools 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 to write frequently used code constructs. 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 that at any time it can instantly find the classes, methods and files the developer needs. IDEA implements several searches, among which are:
  • Finding a class by name
  • Search for a file or directory by name
  • Search by project
  • Modulo search
  • Directory Search
  • Search by region, among:
    • project files
    • project test files
    • open files
    • recently viewed files
    • recently modified files
    • etc.
Also, thanks to the indexing and analysis of the entire project, the autocomplete familiar to developers becomes several levels smarter. 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) provides a deeper analysis of the current situation and suggests using methods of classes or variables for the current context: Creating a project in IntelliJ IDEA - 13Function Static Completionprovides a list of static fields and methods applicable in this context. Working in IDEA, the programmer does not need to think about imports. The development environment imports the necessary packages and removes unnecessary ones 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 applies to the advantages of IntelliJ IDEA. However, like any software product, it has its downsides. 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 512MB on x86 and up to 768MB 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, at the same time, IDEA will devour 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 may break.

Creating a project in IntelliJ IDEA

To create a project, you need to click in the menu File -> New -> Project ... Creating a project in IntelliJ IDEA - 14Next, in the window that opens, you need to select the type of project. IntelliJ IDEA supports several - select Maven from 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, it remains for us to determine the name of the project and its location in the file system. In our case, the values ​​suggested by IntelliJ IDEA will do: Creating a project in IntelliJ IDEA - 17Everything is ready - our project is created. Creating a project in IntelliJ IDEA - 18
Comments
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION