Introduction to Eclipse IDE
A good IDE is essential for better productivity while coding. Eclipse is one such IDE, which has great editor features and many integration points with JEE technologies. In this tutorial, we will learn step by step procedure to set up Java with Eclipse IDE on Windows OS.
Eclipse is an open source IDE for developing applications in many different programming languages. It is quite popular for developing many different types of Java applications. Its architecture is pluggable—there is a core IDE component and many different plugins can be added to it. In fact, support for many languages is added as Eclipse plugins, including support for Java.
Along with editor support, Eclipse has plugins to interact with many of the external systems used during development. Examples include source control systems such as SVN and Git, build tools such as Apache Ant and Maven, file explorers for remote systems using FTP, managing servers such as Tomcat and GlassFish, database explorers, memory and CPU profilers.
Setup Java with Eclipse IDE
Step-1: Download Eclipse IDE
In order to set up Java with Eclipse IDE, you have to download the latest eclipse IDE package from their official website. The current set up is performed using Eclipse IDE 2021-12.
Download the coding pack for Java - Windows i.e. eclipse-inst-jre-win64.exe (name may change later).
Step-2: Start the Eclipse IDE Installer
Now, double click on this installer. So, you will see the screen below. In order to install eclipse, click on the Run button.
On the next screen, you will see many different packages for Eclipse. Make sure you install the Eclipse IDE for Java EE Developers package.
Step-3: Configure Installation Location
By default, It will show the path for Java VM and Installation folder. However, if you want you can select an appropriate path for Java VM and Installation folder. Now, click on Install.
Step-4: Launch Eclipse IDE
Now, Eclipse IDE is installed successfully on your system. Click on Launch to start the Eclipse. Moreover, you can also start the application from the start menu or Desktop icon.
Step-5: Configure Workspace
The Eclipse workspace is a collection of projects, settings, and preferences. It is a folder where Eclipse stores this information. You must create a workspace to start using Eclipse. You can create multiple workspaces, but only one can be opened at a time by one running instance of Eclipse. However, you can launch multiple instances of Eclipse with different workspaces.
Now time to Launch our Eclipse IDE
Write and compile your first Java program using Eclipse IDE
Here, we will see step by step procedure to compile and Run your first program on Eclipse IDE.
Step-1: Create New Project
When you launch Eclipse IDE for the first time, you will see this screen to create a new project. Here, click on Create a new Java Project.
Step-2: Assign Project Name
Give the project name as Demo and click on Next. So, you will see the below given window. Click on Finish.
Now, you have this folder structure for you project Demo.
Step-4: Create Java Class
Right click on Project folder and click on New -> Class.
This pop up will open. Here, we can specify the name of class, its modifiers, and method stubs. Here, we want main method in our class, so select that checkbox and click on Finish.
Step-5: Create Hello World Program in Java
Step 6 : This will open a empty class with main method. Here, we are adding two print statements to print the string.
Step-6: Execute Hello World Program
Now click on Run in the menu bar. Alternatively, you can also run using the shortcut key ctrl+F11.
Verify the output of your code.
Summary
Here, We are done with step by step procedure to set up Java with Eclipse IDE. This is the first step to learning the Java Programming. This editor is very helpful in compiling and running your code easily. In this tutorial, we covered step by step procedure to download and install the Eclipse and set up java with Eclipse IDE for windows OS. All in all, this tutorial, covers everything that you need to know in order to set up java with Eclipse on Windows OS.
References