Quick Start Guide
- Run Your First Java Application
- Look Around
- Smart Coding
- Project Configuration in a Nutshell
- Build Your Project
- Run and Debug Your Application
- Run Tests
- Deploy Your Application to an Application Server
- Customize Everything
- Finding Your Way Around
- Migration from Eclipse or NetBeans
- What's Next?
If you have successfully
installed
Intellij IDEA on your computer, it's time to run it for the first time. You
will see the
Welcome Screen
which gives you main entry points to the IDE. Here you can create a new project,
open an existing one, or check out the project from version control.
Run Your First Java Application
Let's create a simple Java
Hello World
project. Click
Create new project
. The
New Project Wizard
opens.
The main thing you should pay attention to is the
Project SDK. SDK (Software Development Kit) is a set
of
software development tools that lets you develop applications. IntelliJ IDEA does not include an SDK, so If you
have none, download and install it. Since we make a Java project, we need a
Java SDK
(JDK). After installation,
click
New
and point to the installation folder of the JDK.
In the New Project Wizard, you can choose technologies your project will support, but as you're making a plain
Java Application, select none of them and just click Next.
Then IDE offers you to create project from a template. We don't need this now, so click
Next
.
Specify the name and location of the project. Click
Finish
.
You have
src
folder inside your project. This is the folder for your source code. Right click on this folder,
then choose
.
Enter the name of this class, say, quickstart.HelloWorld, and click
Finish
.
Now the new class opens in the editor. Notice, that HelloWorld class is created in quickstart package. HelloWorld program text is a known one.
package quickstart;
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
Put it inside the class.
Every time you run an application, you need to have a configuration, which this process is based on. For creating
a run configuration click
Then click
and choose
Application
.
Here you can specify the main class and program arguments. Since we have a simple application, we need to point
the Main class only. Put
quickstart.HelloWorld
into the Main class text field. Print something in Name field,
for example,
HelloWorldConfig
. Run configuration is ready.
Now you can immediately run your application and make sure all works properly. Choose
from the main menu. Get a result!
For debugging your application, choose . You should also have Run Configuration for this. To learn more, see Run/Debug Configuration: Application.
Look Around
Let's have a closer look on the main window of IntelliJ IDEA. There are several logical areas:

- Menus and toolbars contain commands that affect the entire project or large portions of it. Additionally, context-sensitive pop-up menus let you perform the commands, which are specific to a part of a project, like source file, class, etc.
- Navigation bar helps navigate through the project and open files for editing.
- The status bar indicates the status of your project, the entire IDE, and shows various warning and information messages.
- The editor where you create and modify the code.
- Tool windows perform different functions: help you explore and navigate through the projects and file structures, view search and inspection results, run, debug and test applications, work in interactive consoles, and more.
- Left gutter —the vertical stripe which shows the breakpoints you have, and provides a convenient way to navigate through the code hierarchy like going to definition/declaration. It also shows line numbers and per-line VCS history.
- Right gutter —this stripe constantly monitors the quality of your code and always shows the results of its code analysis: errors, warnings, etc. The square in the top right-hand corner shows the overall status of code analysis for the whole file.
Smart Coding
IntelliJ IDEA has a powerful editor and always helps you creating error-free applications. There are many smart features in IDE, let’s have a look on the most important ones.
Code completion takes into account the current context and saves your time. There are two main types of code completion in IntelliJ IDEA: basic (Ctrl+Space) and smart (Ctrl+Shift+Space). Basic completion works as you type and completes any name instantly. Smart completion analyzes the context you’re currently working in and offers more accurate suggestions based on that analysis. It filters the list of functions and variables to match the expression type.

When a possible problem is suspected, IntelliJ IDEA suggests a solution, and in certain cases can implement this solution (properly assign variables, create missing references and more). Besides syntax problems, IntelliJ IDEA recognizes code constructs that can be optimized or improved, and suggests appropriate intention actions, denoted with the special icons. If you want to know exactly what IDE suggests you in the current situation, click the light bulb, or press Alt+Enter.

IntelliJ IDEA provides a huge set of automated code refactorings from mere renaming to such complicated things as changing a method signature.

Project Configuration in a Nutshell
In Intellij IDEA all exists in the context of a Project, the highest level of organization in the IDE. To specify
the configuration of your project choose
Here you can see several items in Project Settings. Let's have a look at them.
Project . Strictly speaking, here are the settings referring to the project generally, where you can configure the name, SDK, language level, and the compiler output path.
Modules
. Every project consists of modules. Module is a discrete unit of functionality that can be compiled,
run, debugged and tested independently. Modules contain everything that is required for their specific tasks:
source code, build scripts, unit tests, deployment descriptors, and documentation. A module can be a dependency
for another module in the project.
Libraries
. It is one of the module dependency types in Intellij IDEA, an archive of compiled code that a module
can depend on. A Java library, for example, can include class files, archives and directories with class files
as well as directories with Java native libraries (.dll
, .so
or .jnilib
).
Facets . Each module can have a number of facets. Facets are required by the IDE to to provide framework-specific coding assistance, e.g. Web, Spring, Persistence. Mostly, facets are detected automatically by IDE, but here you can configure them manually.
Artifacts
. An artifact is the output you want IntelliJ IDEA to generate for your project. It may be a Java archive (JAR
),
Web application archive (WAR
), an enterprise archive (EAR
),
etc. When you use a build tool, the artifacts are configured automatically, otherwise configure them
manually in this section

For more information about project structure, read Project Structure Dialog or watch "Project Structure and Configuration" video tutorials.
Build Your Project
If your project doesn't use a build tool, use Build menu with the following commands:
- Compile: Compiles files in the selected scope, whether they've changed or not.
- Make: Compiles files if they have changed.
- Rebuild Project: Forces a recompile of the entire project.

IntelliJ IDEA supports
Ant
,
Maven
and
Gradle
. You can create a new project either by using the
Project Wizard
and
choosing a corresponding build tool, or by importing an existing project from source and choosing the
corresponding build file to import from.
If your project uses a build tool, you can also run the tasks of your build tool just from Intellij IDEA. Build menu still works for that kind of projects.
IntelliJ IDEA provides a tool window for a build tool where you can manage specific operations. To open it go to
.
In this window you can also control behavior of the build, run build tasks and add tasks to run configuration as well.
For more information about supported build tools, you can see web help pages about Ant , Gradle or Maven or take a look at "Building on Ant, Gradle and Maven" video tutorial.
Run and Debug Your Application
Run/Debug configuration describes what happens when you click the Run or Debug button in the Toolbar or from Run menu. You can create several configurations and use the particular one you need by choosing from the dropdown. To edit run configuration click
To learn different types of run configurations, please look at the Run/Debug Configurations . See also Run/Debug Configuration basics .
Run and Debug Your Application
Make sure that appropriate test framework is specified in the dependencies of your module.
For running all tests in your application, right-click the test folder and then click Run
'All Tests'
.
You can run particular test by pressing Ctrl+Shift+F10 on it. It is also based on run configuration.
Don't forget to watch Testing video tutorials and read Testing web help page .
Deploy Your Application to an Application Server
Before you deploy an application to an application server, make sure to configure this application server in
Once you have your application server configured, create a corresponding Run/Debug configuration, and specify
your application server:
Also, in the
Deployment
tab specify the actual artifacts to be deployed:
Find more comprehensive tutorial about deploying a Java EE application to an application server at Developing a Java EE Application .
Customize Everything
Customize IDE appearance in
Intellij IDEA provides light and
dark appearance themes. There can be several light ones, depending on your OS, and a dark one called
Darcula
.
Customize the behaviour of the text editor in .
In
,
you can choose any color scheme for the Editor, modify them
and save them as your own.
For configuring styles, go to
IntelliJ IDEA automatically applies a code style you've configured.
There are lots of shortcuts you can use in the text editor. Begin with checking the shortcuts you cannot miss . Also, download a reference card with most frequently used shortcuts for the various platforms: Win/Linux , MacOS .
For choosing from several
keymaps
Intellij IDEA offers you, go to
You can also assign your own shortcut to any action.
Some customizations can be shared with your team via VCS.
Finding Your Way Around
If you've just forgotten a shortcut, use
Find Action (Ctrl+Shift+A)
and look for action by name.
Finally, if you want to find something, but you have no idea where to search, use
Search everywhere
function by pressing Shift twice.
Generally, if you want to find something in settings, use the search bar in the Settings/Preferences dialog .
Try start typing anywhere with trees or lists and find out that speed search is working in many places.
Version Control Integration
IntelliJ IDEA supports Git, CVS, Mercurial, Perforce and others. Having decided which one to use, specify its
settings in
It's possible to add your current project or an
existing project as a new VCS root.
Besides general VCS settings, here you can configure all that corresponds to the particular VCS you are going to
use.
IDE lets you add, delete, commit, revert, manage branches, see history, push, pull and do many other things.
Some operations are available in
Version control tool window
called by
.
Others can be called from corresponding point of VCS menu.
To learn more about VCS see Version Control with IntelliJ IDEA and watch Version Control video tutorials .
Migration from Eclipse or NetBeans
We try to do our best to make migration from other IDE's as painless as possible. For those who migrate from Eclipse, there is a detailed migration guide . For those who migrate from NetBeans it is useful to read IntelliJ IDEA for NetBeans Users . Remember that you can keep previous IDE keymap, and also have a look at Importing projects from other IDE video tutorials.
What's Next?
When you complete this guide, have fun watching Tips and tricks video from Hadi Hariri. Feel free to share your feedback in our discussion forum and issue tracker. We wish you a good luck with finding your way through Intellij IDEA!