Lesson Roadmap
1. What is an IDE?
IDE means Integrated Development Environment. It is a software application where we write, run, test, and debug programs.
The place where you write Java code.
Helps convert Java code into bytecode.
Watch First: Installing and Using Java IDEs
Watch this video first, then follow the step-by-step written lesson below to install Java IDEs and run your first Java program.
Lets you execute your program easily.
Helps you find mistakes step by step.
2. Install Java JDK First
Before installing any Java IDE, install the Java Development Kit (JDK). The JDK contains the tools needed to compile and run Java programs.
Recommended beginner setup
| Item | Recommended choice |
|---|---|
| Java version | Use a current Long-Term Support version or the latest stable JDK available from Oracle/OpenJDK. |
| Operating system | Windows, macOS, or Linux |
| First check | Run java -version in Terminal or Command Prompt. |
Install steps
Search: Oracle Java JDK download or OpenJDK download.
For Windows, choose the x64 installer if your system is 64-bit.
Keep the default settings unless your teacher gives a special instruction.
java -version
Then type:
javac -version
java version "21..."
javac 21...
3. Which IDE Should You Choose?
All four IDEs can be used for learning Java. For CBSE students, the best IDE is the one that lets you write, run, and understand simple Java programs without confusion.
Eclipse
Good for school and college Java. Many Java developers have used Eclipse for years.
Best for: Classic Java learning and project-based practice.Apache NetBeans
Simple, friendly, and excellent for beginners. Project creation is easy.
Best for: Beginners who want a clear Java project structure.Visual Studio Code
Lightweight editor with Java extensions. Very useful if you also learn web development.
Best for: Students who want one editor for Java, HTML, CSS, JavaScript, and Python.IntelliJ IDEA
Modern and powerful Java IDE. The Community Edition is enough for core Java.
Best for: Serious learners who want smart suggestions and a polished interface.4. Installing and Using Eclipse for Java
Eclipse is a popular Java Integrated Development Environment. It is especially useful for understanding Java projects, packages, classes, and debugging.
Installation steps
Create your first Eclipse project
- Click File.
- Click New.
- Click Java Project.
- Project name:
FirstJavaProject. - Click Finish.
- Right-click
src. - Click New → Class.
- Class name:
HelloJava. - Select public static void main(String[] args) if the option appears.
- Click Finish.
public class HelloJava {
public static void main(String[] args) {
System.out.println("Hello Java from Eclipse!");
}
}
Hello Java from Eclipse!
5. Installing and Using Apache NetBeans for Java
Apache NetBeans is a beginner-friendly IDE for Java. It provides project templates, code highlighting, and easy Run buttons.
Installation steps
Create your first NetBeans project
- Click File.
- Click New Project.
- Select Java with Ant or Java with Maven.
- Select Java Application.
- Project name:
FirstNetBeansJava. - Click Finish.
public class Main {
public static void main(String[] args) {
System.out.println("Hello Java from NetBeans!");
}
}
Hello Java from NetBeans!
6. Installing and Using Visual Studio Code for Java
Visual Studio Code, also called VS Code, is a lightweight editor. To use it properly for Java, install the Java extensions.
Installation steps
Create your first VS Code Java file
- Create a folder named
java-practice. - Open that folder in VS Code.
- Create a file named
HelloJava.java. - Write the code below.
public class HelloJava {
public static void main(String[] args) {
System.out.println("Hello Java from VS Code!");
}
}
Run using VS Code button
After the Java extension loads, VS Code usually shows a Run option above
the main method.
Run using terminal
javac HelloJava.java
java HelloJava
Hello Java from VS Code!
7. Installing and Using IntelliJ IDEA for Java
IntelliJ IDEA is a modern Java IDE. For school-level Java and core Java practice, IntelliJ IDEA Community Edition is usually enough.
Installation steps
Create your first IntelliJ IDEA project
- Click New Project.
- Select Java.
- Choose your installed JDK.
- Project name:
FirstIntelliJJava. - Create the project.
- Right-click
src. - Click New → Java Class.
- Class name:
HelloJava.
public class HelloJava {
public static void main(String[] args) {
System.out.println("Hello Java from IntelliJ IDEA!");
}
}
main method.
You should see:
Hello Java from IntelliJ IDEA!
8. The First Program You Should Run in Every IDE
To check whether your IDE is working properly, run this same program in all four IDEs.
public class MyFirstProgram {
public static void main(String[] args) {
System.out.println("My Java setup is working.");
System.out.println("I am ready to learn CBSE Java.");
}
}
My Java setup is working.
I am ready to learn CBSE Java.
Important rule about file name and class name
In Java, if the class is public, the file name must match the class name.
| Class name | Correct file name |
|---|---|
public class MyFirstProgram |
MyFirstProgram.java |
public class Student |
Student.java |
public class Calculator |
Calculator.java |
9. IDE Comparison for Students
| IDE | Difficulty | Good points | Possible confusion |
|---|---|---|---|
| Eclipse | Medium | Strong Java project support, widely used | Workspace and project structure may confuse beginners |
| NetBeans | Easy | Simple project creation, beginner-friendly | May create packages and templates automatically |
| VS Code | Easy to Medium | Lightweight, useful for many languages | Needs Java extensions and correct JDK setup |
| IntelliJ IDEA | Easy to Medium | Modern, intelligent suggestions, smooth interface | Many options can look advanced at first |
10. Common Setup Errors and Fixes
Error 1: java is not recognized
This usually means Java is not installed properly or the system PATH is not set.
Fix: Install the JDK again and restart Command Prompt or your computer.Error 2: javac is not recognized
This usually means the Java compiler is not available in PATH.
Fix: Make sure you installed the JDK, not only the Java Runtime Environment.Error 3: Class name and file name mismatch
If your class is public class HelloJava, the file must be
HelloJava.java.
Error 4: Main method not found
Java needs this method to start the program:
public static void main(String[] args)
Error 5: Package problem
Some IDEs create packages automatically. Do not randomly delete the package line unless you understand the project structure.
11. Practice Tasks
Task 1: Install and verify Java
Install the JDK and run:
java -version
javac -version
Task 2: Run Hello Java
Run a simple HelloJava program in one IDE.
Task 3: Try two IDEs
Run the same program in two IDEs and compare the experience.
Task 4: Create a Scanner program
Create a program that asks for name and age, then prints a greeting.
import java.util.Scanner;
public class StudentIntro {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print("Enter your name: ");
String name = sc.nextLine();
System.out.print("Enter your age: ");
int age = sc.nextInt();
System.out.println("Hello " + name + ". You are " + age + " years old.");
sc.close();
}
}
12. Final Recommendation
For CBSE Java learners, do not waste too much time choosing the “perfect” IDE. The main goal is to write Java code regularly.
NetBeans or IntelliJ IDEA Community Edition
Visual Studio Code
Eclipse
Writing, running, fixing, and improving programs
13. Join the Guided CBSE Java Learning System
Learn at your own pace with structured lessons, coding practice, doubt support, WhatsApp guidance, and Zoom help when needed.
- Step-by-step Java lessons
- CBSE-focused examples
- Weekly coding practice
- Debugging support
- Up to 10 support queries per week