This article is for newbies, looking for step by step instructions on “How to install Eclipse IDE” in Windows 10. I will also help you to run your first “Hello World” Program in Eclipse Java IDE.
Before diving into details, let’s understand a little bit about Eclipse.
What is Eclipse
Eclipse is an open-source IDE (Integrated development environment) available for cross platforms like Windows, Linux and macOS. The primary use of Eclipse is to develop Java applications but can be used to develop apps in other programming languages also.
Most of the old versions of Eclipse are scientific names based on moons like Callisto, Europa, Ganymede, Helios, Juno, Neon, Kepler etc.
How to Install Eclipse IDE
To Install Eclipse IDE, you need to download the latest version of Eclipse IDE first. The latest version available while writing this article is Eclipse IDE 2021‑03.
Step 1.1 – Visit Eclipse.org website
Open your favourite browse and visit “https://www.eclipse.org/downloads/“.
Step 1.2 – Download Eclipse IDE 2021-03 for x86_64 systems
You can simply click on this “Download button” to avoid all hassles and get Eclipse IDE 2021-03 installer for Windows 10.
Alternatively, Click on “Download x86_64” button as shown in image on the download page of Eclipse.org.
It will take you to download the mirror page. Click on “Download” to get “eclipse-inst-jre-win64.exe“.
By default, it selects a mirror near to your country. For example, Japan in my case. You can always change it to your preferred location. Just click on “<<select another mirror” as visible in the image.
If you are looking for an older version of Eclipse for Windows, Linux or macOS. Visit https://www.eclipse.org/downloads/packages/ to download your preferred version.
Install Eclipse IDE 2021-03 for java developers in Windows 10
Step 2.1 – Run Eclipse Installer
Visit your Download directory and <Double click> to run “eclipse-inst-jre-win64” installer.
Step 2.2 – Select Eclipse IDE for Java Developers
Select “Eclipse IDE for Java developers” option on edition selection page.
There are lot of other editions are also available. I would recommend you to just have a quick look by scrolling down.
Step 2.3 – Select your preferred JRE version
In the older version, it was a pre-requisite to install Java first. But now-a-days, JRE is built in Eclipse installer.
Also, you get the list and flexibility to download and install your preferred JRE version. For example, JRE 15.0.2, JRE 14.0.2 and JRE 11.0.2 are available.
I will got with latest and default available JRE 15.0.2 for this tutorial.
Step 2.4 – Customize Eclipse IDE installation location, if required
The default location of the Eclipse IDE 2021-03 installation would be your “user’s home” directory. But in case you want to customize it. You can click on Browse (“Folder icon”) and navigate to your preferred drive or directory to install Eclipse.
I would leave it by default with “C:\users\Devender\eclipse\java-2021-03“.
Step 2.6 – Click on “Install” Eclipse IDE for Java developers
Once you are done with Java virtual machine and Installation folder location. You are ready to Install Eclipse.
You can leave below mentioned options checked –
- Create start menu entry
- Create desktop shortcut
<Click> on “Install” to start Eclipse ide 2021-03 for java developers.
Step 2.7 – Accept Eclipse end user license agreement (EULA)
Like all other software, Eclipse IDE also ask you to agree with End User License Agreement (EULA).
Click “Agree Now” and move further.
Step 2.8 – Let Eclipse IDE installation complete
Now the installation will kick in. It may take some time depending upon “internet” and your system speed. So sit back and relax.
Step 2.9 – Launch Eclipse IDE
Once Eclipse IDE installation completes, You can start Eclipse by clicking on “Launch” button.
Step 2.10 – Select a directory workspace for Eclipse Projects
On the Next Screen after you Launched Eclipse. It will ask you to setup directory for your workspace. Here you can save all your projects and application files.
The default workspace directory would be under “user’s home directory“. For example “C:\Users\Devender\eclipse-workspace” in my case. You can click on “Browse” and customize it as per your wish.
*** To avoid this pop up to bother you again and again, you can select checkbox "Use this as the default and do not ask again". I will leave it default.
Click on “Launch“.
It will take you to the Welcome page of Eclipse IDE for java developers.
Congrats!! you are done with the latest Eclipse 2021-03 installation in your Windows 10 system.
Now, let me show you, How to run your first java code in Eclipse.
Create a Java project and run your First “Hello World” application
Step 3.1 – Select “Create a new Java project”
Lets create our first java project.
- Select “Create a new Java project” on welcome page of Eclipse IDE for Java developers.
Step 3.2 – Enter a Project name and leave all other settings default
- Provide “project name“. For example, I will give it a name “First Hello project“.
- Leave all settings default and hit “Finish“.
Step 3.3 – Don’t create module-info.java file
Select “Don’t create“, when it asks you to provide a module-info.java name to create it.
Step 3.4 – Create a new java class
To create a Java class, follow these simple steps –
- <Right click> on “First Hello Project” in the left pane of “package explorer”
- Select “New” from drop-down
- Select “Class“
Step 3.5 – Give a Name to Java class and make it “Public static void main“
On this screen, You need to enter Java “Class name“. for example, I have given “HelloWorld” as name.
Also, Select “Public static void main (String args)” option in “which method stubs would you like to create section“.
Leave all other settings default and click Finish.
Step 3.6 – Write your first code “Hello World”
Now type the below-mentioned code into your first “HelloWorld.java” file. Please refer to the image, don’t delete or modify the already available code.
Step 3.7 – Run your first program
To execute your program follow theses steps –
- Click on Run or press <Ctrl + F11> on your keyboard.
- Click “OK” on Save and Launch dialogue box as shown in the image.
Step 3.8 – Validate Program output
Verify Program output in console. You will see “Hello World!” text, if you program runs perfectly.
Hurray!! you have ran your first Java program in Eclipse IDE 2021-03.
In case you have any doubt in tutorial, You can watch out this useful video on “How to install Eclipse IDE in Windows 10“.
I hope you liked this tutorial on “How to Install Eclipse IDE 2021-03 for Java developers. Now you free to explore the Java world in Eclipse IDE.
Which is your favourite IDE for java development application? You can let me know through your comments!!
Further readings –
Keep learning and stay safe in this pandemic.