Getting Started with IntelliJ IDEA
Tips for getting started with IntelliJ IDEA
You can find more information on getting started with IntelliJ IDEA in our playlist on our YouTube channel.
IntelliJ IDEA Welcome Screen
Get a project from source control, open an existing project, or create a new project
The New Project Wizard helps you to create projects with different build systems and frameworks. There's more information in our screencast.
Download a JDK
Download or associate a JDK with your project.
You can use the New Project Wizard to configure existing JDKs, or download new ones from different vendors.
Configure Your Editor
Setup the editor to suit your requirements
Press ⌘⇧A (macOS) / Ctrl+Shift+A, or to display Find Actions and then you can type tab placement, navigation bar, tool windows to modify or disable these elements.
Create New Class
Quickly add new classes to your project
Press ⌘1 (macOS) / Alt+1 (Windows/Linux), to open the Project Window and then use ⌘N (macOS) / Alt+Insert (Windows/Linux), to generate a new file.
These same shortcuts will help you in many places where you need to generate code, such as constructors, getters and setters, toString methods and adding arguments to methods when you need to refactor.
Navigate to Test
Go to your matching test class
You can use ⌘⇧T (macOS) / Ctrl+Shift+T (Windows/Linux), to navigate to a test class and back again. IntelliJ IDEA will navigate to the related Test file, or suggest creating a test. It can even add some of the code constructs for the tests as well.
How to Search Everywhere in Any JetBrains IDE
Use ⇧⇧ (macOS), or Shift+Shift (Windows/Linux), to bring up the Search Everywhere dialog. You can search across Classes, Files, Symbols and Actions.
The Problem
How do I find stuff, without memorizing a bunch of stuff? You’re editing something. You want to jump to something in your project. The IDE has so many options. What’s the fastest way?
You could browse through the file tree to find the file. Similarly, activate the navigation bar and wander around. Lots of other choices: Recent Files, Recent Locations, bookmarks, keeping a thousand tabs open.
The Solution
Press ⇧⇧ (macOS) / Shift+Shift (Windows/Linux) for Search Everywhere. The one IDE entry point to find everything. Type a string, make a selection, and jump to the target.
To dismiss the popup, press Escape. You can jump to a file by putting in the name of a file, not something in the file. You can type parts of a file path, to save some time. Those tabs show the kinds of things that can be searched. Hit tab to go Classes, then again to go to Files.
Mouseover on the tabs to show key bindings to open directly. “Symbols” is a favorite. Actions…the next tip. Want more power? Here’s three bonus tips:
- This checkbox controls how widely Search Everywhere goes looking. Press ⇧⇧ (macOS) / Shift+Shift (Windows/Linux) again to toggle it to checked, then again to unchecked.
- Use filter… to restrict results by certain criteria, per-tab.
- Click Open in Find Tool Window to get the full find treatment.
Yes, you can resize this window, as if it was a normal window. Next time you use Search Everywhere, it will remember the dimensions. Last point: the footer area has…tips! As you can see from these, lots of power in Search Everywhere.
Here’s one you didn’t see coming: Search Everywhere is also a desktop calculator.
Search Everywhere is the perfect first thing. Super-easy to learn, immediately useful, and gradually scales to more power.
Run in Current Context
Run just a file or a script
Press ⌃⇧R (macOS) / Ctrl+Shift+F10 (Windows/Linux), to run the file in its current context.
Run your code with Docker, SSH or WSL
Set a Run Target to change where your code runs
You can configure a Run Target of Docker, SSH or WSL for Java unit tests, Maven and Gradle projects, and for Spring Boot, Micronaut and Quarkus applications.
This means you can, for example, run Spring Boot applications with a Docker target.
Commit Changes
Commit your changes to VCS
Use ⌘0 (macOS) / Alt+0 (Windows/Linux) to display the Commit tool window. Select the changes you want to commit. From here you can either click Commit to commit your changes locally, or Commit and Push to commit your changes and push them to the remote repository.
Alternatively, you can use ⌘K (macOS) / Ctrl+K (Windows/Linux) to open the Commit tool window with your changes already selected, or ⌘⌥K (macOS) / Ctrl+Shift+K (Windows/Linux) to commit and push your changes.