JetBrains logo

IntelliJ IDEA

JetBrains IDEs

Getting Started With IntelliJ IDEA

Every aspect of IntelliJ IDEA is designed to make coding more productive and enjoyable and – more importantly – to make you a happier developer.

Table of Contents

This page will help you on your way to becoming an IntelliJ IDEA expert, so settle in and get ready to learn!

Create a project

Create a project in just a few clicks while IntelliJ IDEA guides you through the process. All the developer tools you need are already there and ready to use. You don’t even need to download the JDK yourself – IntelliJ IDEA will do it for you!

JVM frameworks and technologies

In addition to Java and Kotlin code, the IDE supports leading frameworks and technologies, such as Spring, Hibernate, JPA, and others.

Web development

IntelliJ IDEA is also perfect for web development, supporting a wide range of JavaScript and related technologies, such as TypeScript, React, Vue, Angular, Node.js, HTML, and CSS.

Run your first application

To run your application, click on the green ▶ icon in the sidebar. Alternatively, you can use a predefined shortcut: ⌃R (macOS) or Shift+F10 (Windows/Linux).

Useful shortcuts

Action

Run

macOS

⌃R

Windows/Linux

Shift+F10

Run the current file

⌃⇧R

Ctrl+Shift+F10

Display a list of run configurations

⌃⌥R

Alt+Shift+F10

Open the Run Anything dialog

⌃⌃

Ctrl+Ctrl

Terminate a running process

⌘F2

Ctrl+F2

Intelligent Editor

IntelliJ IDEA comes with one of the most powerful code editors in the industry.

Code completion

IntelliJ IDEA’s editor is context-aware and automatically provides the best possible code options as you type.

Simply pick the one that fits your needs from the popup list and keep on coding.

AI-powered suggestions

The IDE can also provide AI-powered suggestions for entire lines of code, based on the context you’re working in. To accept the suggestion, press (macOS) or Tab (Windows/ Linux).

Context actions

⌥↩ (macOS) or Alt+Enter (Windows/Linux) shortcut calls a list of context-sensitive fixes and suggestions, and in just a few clicks, you get a refined code without breaking the workflow.

Language injections

IntelliJ IDEA provides full support for code snippets from different languages within your main code. In most cases, the language injection applies automatically, but you can also call it manually by pressing ⌥↩ (macOS) or Alt+Enter (Windows/Linux), selecting Inject language or reference, and choosing your desired language from the list.

Refactorings

Refactor This

With thorough project scanning, IntelliJ IDEA ensures quick, reliable, and safe refactorings to your existing code.

Just press ⌃T (macOS) or Ctrl+Alt+Shift+T (Windows/Linux), to see a list of refactoring actions.

Rename refactoring

Change the names of symbols, files, directories, packages, modules, and their references in the code. Preview and evaluate changes in the Rename Accessors window before applying.

Safe Delete refactoring

IntelliJ IDEA detects unused code fragments or whole files and lets you delete them, always informing you if it's safe to delete the code by checking its usages.

Extract refactoring

Extract refactorings help make your code more readable by restructuring it, reducing code duplications, and thus eliminating potential errors and bugs.

Useful shortcuts

Action

Safe Delete

macOS

⌘⌫

Windows/Linux

Alt+Delete

Rename

⇧F6

Shift+F6

Copy/Move

F5/F6

F5/F6

Refactor This

⌃T

Ctrl+Alt+Shift+T

Live templates

Using Live templates

With live templates, you can insert complete code blocks in a couple of keystrokes. This function is perfect for loops, conditions, declarations, or print statements

Surround templates

The surround templates function allows you to quickly wrap the selected code block with any tags you might need. To do so, press ⌘⌥J (macOS) or Ctrl+Alt+J (Windows/Linux) and choose your desired template in the resultant Select Template popup.

Live templates library

You can check a list of available live templates by pressing ⌘J (macOS) or Tab (Windows/Linux) right in the editor.

Useful templates

Key combination

st

Expands to

String

psfs

public static final String

main or psvm

public static void main(String[] args){

}

sout

System.out.println();

soutv

System.out.println("$EXPR_COPY$ = " + $EXPR$);

iter

for ($ELEMENT_TYPE$ $VAR$ : $ITERABLE_TYPE$) {

$END$

}

ifn

if (var == null) {

}

Integrated developer tools

Debugger

The IntelliJ IDEA's debugger is a powerful tool that can reveal what's happening under the hood of your program and help you detect bugs.

Debug tool window

To start debugging, set a breakpoint and click on the bug icon in the upper-right Run/Debug panel or press ⌃D (macOS) or Shift+F9 (Windows/Linux). The IDE will then show the results in a dedicated tool window. Here, you can inspect the values of variables and objects, as well as the call stack.

Breakpoints

Breakpoints let you stop the execution of the program so you can examine it in a specific state or scenario. Set a breakpoint on the line where you want the execution to stop by clicking the gutter next to that line. Alternatively, use the shortcut ⌘F8 (macOS) or Ctrl+F8 (Windows/Linux).

Manage breakpoints

You can right-click the breakpoint and set its advanced conditions. To view all breakpoints and their settings click on More, ⌘⇧F8 (macOS) or Ctrl+Shift+F8 (Windows/Linux). Here you can remove, enable/disable, group breakpoints, and much more.

Step through the program

While you examine the state of your application, you can step through your code, evaluate expressions, see and change variable values, and add watches and labels. IntelliJ IDEA provides a lot of stepping options: from basic – Step Over, Step Into, or Step Out to advanced – Force Return, Throw Exception.

Useful shortcuts

Action

Debug an application

macOS

⌃D

Windows/Linux

Shift+F9

Toggle a breakpoint

⌘F8

Ctrl+F8

Step Into while debugging

F7

F7

Step Over while debugging

F8

F8

Evaluate expression

⌥F8

Alt+F8

Resume program

⌥⌘R

F9

Profiler

The profiler helps you identify CPU- and memory-intensive sections, threading issues, and suboptimal code. The results can be analyzed and compared in graphical and hierarchical charts.

Start profiling

To start profiling, click on the ▶ icon in the sidebar next to the code and select Profile with IntelliJ Profiler. Profiling data will be displayed in the dedicated Profiler tool window.

Live charts

Live data helps to visualize resource consumption, identify resource-related bottlenecks, and understand how certain events affect the performance.

Snapshots

Analyze CPU and memory usage over a specific period of time with various easy-to-read charts: Flame Graph, Call Tree, Method List, Timeline, and Events.

In-editor performance hints

What’s more, IntelliJ IDEA displays in-editor hints as a quick, convenient way to analyze code performance line by line. You no longer need to leave your code to view profiling data!

Database tools

Run queries, connect to databases, browse and export data, and even manage your schemas – all without leaving IntelliJ IDEA.

Add a database

Connect to a database through the Database tool window (View | Tool Windows | Database) by clicking on ➕ and following the simple setup steps.

Work with data

Now you can freely navigate through the data, sort it, edit cell values, and push changes to live databases – all without writing a single SQL query…

Run queries

…But you can still write SQL queries if you want! Just click on Jump to Query Console in the Database tool window. Run queries by clicking on the ▶ icon.

Charts

You can use charts to visualize SQL query results in the data editor. Choose from plenty of chart types, like bar, pie, area, line, and many more.

HTTP Client

Create, edit, and execute HTTP, gRPC, GraphQL, and WebSocket requests without leaving the IDE.

Open HTTP Client

To access the HTTP Client from the source code, click on the 🌐 icon next to the URL and select Generate request in HTTP Client.

Compose an HTTP request

Once you’ve opened the HTTP Client, go to Tools | HTTP Client | Create Request. If a request file is opened in the editor, this will add a request template to the opened file. Otherwise, this will create a new .http scratch file.

Execute an HTTP request

To execute a request, click the ▶ button next to the request in the gutter. If you have multiple HTTP requests defined in an .http file, you can run all of them sequentially. To do this, click Run all HTTP requests on the top of the request's editor panel.

Code faster with AI Assistant

IntelliJ IDEA’s AI Assistant provides AI-powered features to further boost your productivity and code quality. Now you can delegate repetitive tasks to AI!

AI Assistant will not be active unless you install the plugin and acquire a JetBrains AI Service license.

Chat with AI

To start a chat, click on the Galaxy icon in the Tools panel and start typing your query. You can ask AI Assistant any development-related questions!

In-editor AI actions

To invoke the in-editor AI Actions list, select the code block on which you’d like to perform an action and select AI Actions from the floating toolbar.

Develop remotely

Developers can collaborate effectively with their teammates no matter where they are and code on any laptop while a remote server handles all of the heavy processing.

Remote development

Work effortlessly on any laptop, no matter how powerful it is. Remote development functionality splits the IDE into two components: a local lightweight client (your laptop) and a remote server that handles all the heavy processing. Set up the environment from IntelliJ IDEA’s Welcome screen.

Make IntelliJ IDEA to become a productivity powerhouse with a plethora of customization options from font size to themes to plugins and beyond!

Project headers and themes

By default, IntelliJ IDEA’s editor uses a Dark theme with a randomly assigned color for the header for your project. You can change the theme to Light and High Contrast via Preferences/Settings | Appearance & Behavior | Appearance. To change the color of the header right-click the header and choose an option from the context menu.

Plugins

You’ll find thousands of functionality-expanding IDE plugins on JetBrains Marketplace (Preferences/Settings | Plugins) – from interface enhancements, themes to frameworks, and even fun plugins like a project name generator inspired by mythical creatures and Swedish furniture names. Go and check them out for yourself!

Accessibility

The IDE provides accessibility features (Preferences/Settings | Appearance & Behavior | Appearance) to ensure that any developer can use the IDE to its full potential. These include the ability to zoom in up to 200%, customizable font sizes, a built-in high-contrast theme, color adjustment for red-green color vision deficiency, and many more.

Wrapping Up

IntelliJ IDEA has so much to offer for maximizing productivity and simplifying the coding process.

It’s nearly impossible to fit everything on one page, but there are plenty of resources available to help you dive deeper into the IDE’s functionality:

  • The Features Overview page provides a compilation of features conveniently grouped and illustrated.
  • The documentation contains more in-depth technical information.
  • Our blog offers tips and tricks, articles from professional developers, and more.
  • The IntelliJ IDEA YouTube channel with detailed videos and insightful webinars.
  • IntelliJ IDEA includes a built-in IDE Features Trainer. You can access the interactive learning course from the Welcome screen or from the Learn tool window (View | Tool Windows | Learn).

This page and resources make a perfect combo to master IntelliJ IDEA and enhance your coding experience.

Enjoy more productive development with IntelliJ IDEA!