Choosing a Java Editor or IDE — VS Code vs IntelliJ vs Eclipse

2 minute read

Now that Java is installed, you need a tool to write code in. You could use Notepad, but a good IDE (Integrated Development Environment) makes coding dramatically easier — with features like auto-completion, error highlighting, debugging, and one-click run.


The Top 3 Java Editors

Feature IntelliJ IDEA Community VS Code + Java Extensions Eclipse
Cost Free Free Free
Best for Serious Java development Lightweight, multi-language Enterprise Java
Auto-complete ⭐⭐⭐⭐⭐ ⭐⭐⭐⭐ ⭐⭐⭐⭐
Debugging ⭐⭐⭐⭐⭐ ⭐⭐⭐⭐ ⭐⭐⭐⭐
Speed Moderate (needs RAM) Fast and lightweight Moderate
Learning curve Low Low Moderate
RAM needed 4GB+ 2GB+ 4GB+
Maven/Gradle Built-in Via extensions Built-in
Spring Boot Excellent (paid Ultimate) Good with extensions Good with STS

Our Recommendation

  • Beginners → Start with IntelliJ IDEA Community (best Java experience)
  • Already using VS Code → Add the Extension Pack for Java (works great)
  • Enterprise work → Eclipse or IntelliJ Ultimate

Install

  1. Go to https://www.jetbrains.com/idea/download/
  2. Download the Community Edition (free)
  3. Install and launch

Create Your First Project

  1. Click “New Project”
  2. Set:
    • Name: java-basics
    • Location: your java-projects folder
    • Language: Java
    • Build system: IntelliJ
    • JDK: 21 (select from dropdown or add your installed JDK)
  3. Click “Create”

Create and Run a File

  1. Right-click src folder → New → Java Class → name it HelloWorld
  2. Type:
public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello from IntelliJ!");
    }
}
  1. Click the green ▶ Run button next to main — or press Shift + F10

Output appears in the bottom panel:

Hello from IntelliJ!

Essential IntelliJ Shortcuts

Shortcut (Mac / Windows) Action
Cmd+Shift+F10 / Shift+F10 Run current file
Cmd+B / Ctrl+B Go to definition
Cmd+/ / Ctrl+/ Toggle comment
Cmd+Shift+Enter / Ctrl+Shift+Enter Complete statement
Cmd+Option+L / Ctrl+Alt+L Format code
Cmd+P / Ctrl+P Parameter info

Option 2: VS Code with Java Extensions

Install

  1. Download VS Code from https://code.visualstudio.com/
  2. Open VS Code and install the Extension Pack for Java:
    • Press Cmd+Shift+X (Mac) or Ctrl+Shift+X (Windows)
    • Search “Extension Pack for Java”
    • Install (by Microsoft)

This pack includes:

  • Language Support for Java (Red Hat)
  • Debugger for Java
  • Test Runner for Java
  • Maven for Java
  • Project Manager for Java

Create and Run a File

  1. Open your java-projects folder in VS Code
  2. Create a file HelloWorld.java
  3. Type:
public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello from VS Code!");
    }
}
  1. Click “Run” above the main method — or press F5

Option 3: Eclipse IDE

Install

  1. Go to https://www.eclipse.org/downloads/
  2. Download Eclipse IDE for Java Developers
  3. Install and launch
  4. Choose a workspace folder when prompted

Create and Run a File

  1. File → New → Java Project → name it java-basics
  2. Right-click src → New → Class → name it HelloWorld, check “public static void main”
  3. Type your println inside main
  4. Right-click → Run As → Java Application

Running Java from the Command Line

Regardless of your IDE choice, you should also know how to compile and run from the terminal — it’s useful for understanding what happens behind the scenes:

$ cd ~/java-projects
$ javac HelloWorld.java     # Compile → creates HelloWorld.class
$ java HelloWorld            # Run → executes the bytecode
Hello from the command line!

The javac command compiles. The java command runs. No file extension when running (it’s java HelloWorld, not java HelloWorld.class).


Summary

Situation Recommended Tool
Learning Java (beginner) IntelliJ IDEA Community
Already using VS Code VS Code + Extension Pack for Java
Enterprise / legacy projects Eclipse
Quick scripts / testing Terminal + any text editor

What’s Next?

Your environment is ready. Time to write your first real Java program:

Your First Java Program — Hello World →

Updated: