Hereโs a simple, beginner-friendly guide to run your first Java program using Eclipse IDE โ๐ป
1. Install Required Software
Before starting, make sure you have:
- JDK (Java Development Kit) installed
- Eclipse IDE for Java Developers
๐ If Eclipse opens without errors and lets you create a Java project, your JDK is already configured.
2. Open Eclipse IDE

- Launch Eclipse
- Select a Workspace (a folder where your projects will be stored)
- Click Launch
3. Create a New Java Project
- Go to File โ New โ Java Project
- Enter Project Name (example:
FirstJavaProgram) - Click Finish
๐ Youโll see the project appear in the Package Explorer.
4. Create a Java Class

- Right-click on src โ New โ Class
- Enter:
- Package name (optional):
com.example - Class name:
HelloWorld
- Package name (optional):
- โ Check public static void main(String[] args)
- Click Finish
5. Write Your First Java Program
Eclipse will auto-generate code. Replace or confirm it looks like this:
package com.example;
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
6. Run the Java Program

Method 1 (Recommended for beginners)
- Right-click anywhere in the editor
- Select Run As โ Java Application
Method 2
- Click the โถ Run button on the toolbar
7. View Output in Console
At the bottom of Eclipse, youโll see the Console showing:
Hello, World!
๐ Congratulations! Youโve successfully run your first Java program.
Common Beginner Issues (Quick Fixes)
- โ No JDK found โ Install JDK and set
JAVA_HOME - โ Run option disabled โ Ensure
main()method exists - โ Red error marks โ Check spelling and semicolons
;