Choosing an IDE

Naveen AnamaneniUpdated · 5 min read

You can write Java in Notepad, and doing it for your first few programs teaches you what's really going on. But nobody builds real software that way. An IDE (Integrated Development Environment) underlines mistakes as you type, completes long names for you, runs and debugs with one click, and finds any class in a large project in a second. Picking one now saves you hours every week.

What an IDE Does for You

FeatureWithout an IDEWith an IDE
Spotting mistakesRun javac, read the error, find the lineRed underline while you type
Long namesType ArrayIndexOutOfBoundsException in fullType AIO and press Enter
ImportsWrite every import line yourselfAdded automatically
Runningjavac then java in a terminalOne click or one shortcut
DebuggingAdd println everywhereBreakpoints and step-by-step running
RenamingSearch and replace, hoping nothing breaksRename safely across every file
IntelliJ IDEAEclipseVS Code
Made byJetBrainsEclipse FoundationMicrosoft
CostFree version, plus a paid Ultimate editionFree, open sourceFree; add the "Extension Pack for Java"
StrengthSmart code completion and refactoring; the most common choice in Java jobsLong history, common in older enterprise projectsLight and fast; good if you also write JavaScript or Python
Feels likeA complete Java workshopA traditional, highly configurable IDEA text editor with Java added
Good for this course?Yes, recommendedYesYes

For this course, we recommend IntelliJ IDEA. It's what most Java teams use, its free version covers everything in Core Java, and its hints teach you good habits. If your college or company uses Eclipse, that's fine too: the Java is the same.

Your First Project in IntelliJ IDEA

  1. Download IntelliJ IDEA from jetbrains.com/idea and install it.
  2. Choose New Project, select Java, and pick JDK 25 in the JDK drop-down. If it isn't listed, choose "Add JDK..." and select the folder you installed in "Installing the JDK".
  3. Leave the build system as IntelliJ, tick Add sample code, and click Create.
  4. Open Main.java and click the green Run arrow next to main.

Replace the sample code with this program and run it again:

Main.java▶ Try it
public class Main {
    public static void main(String[] args) {
        String course = "Core Java";
        int lessonsDone = 21;
        System.out.println("Course: " + course);
        System.out.println("Lessons done: " + lessonsDone);
    }
}
Output
Course: Core Java
Lessons done: 21

How it works

  1. Lines 3 and 4 store a piece of text and a whole number.
  2. Lines 5 and 6 print them. In the IDE, the output appears in the Run window at the bottom.

Try it yourself: on line 5, delete the closing " after Course: . Notice the red underline appear before you run anything. Then put it back.

Shortcuts Worth Learning First

ActionIntelliJ IDEA (Windows / Linux)IntelliJ IDEA (macOS)
RunShift + F10Ctrl + R
DebugShift + F9Ctrl + D
Complete codeCtrl + SpaceCtrl + Space
Show a fix for the problem under the cursorAlt + EnterOption + Enter
Format the fileCtrl + Alt + LCmd + Option + L
Find any file or classShift twiceShift twice

Common Mistakes

Picking the wrong JDK in a new project. If the project uses JDK 17, Java 25 features such as compact source files show errors. Check the project's JDK in the project settings.

Accepting every suggestion without reading it. The IDE's fixes are guesses. Read what it's about to change, especially when it offers to change a type.

Never using the terminal. Interviews, servers and build pipelines don't have a Run button. Keep practicing javac and java now and then.

Practice

  1. Easy: Install IntelliJ IDEA (or your chosen IDE), create a project with JDK 25 and run the Main program above.
  2. Harder: Type Syst and press Ctrl + Space. Then type sout and press Tab. What does each one produce? Find one more shortcut like sout that saves typing.

Quick check: Choosing an IDE

4 questions
1What compiles your code when you press Run in an IDE?
2Which IDE does this course recommend?
3What does VS Code need to work well with Java?
4Which shortcut shows a quick fix in IntelliJ IDEA on Windows?

Key Takeaways

Was this tutorial helpful?

Lesson 19 of 482