How To Install Eclipse For Java On Mac
How To Install Eclipse For Java On Mac
April 27, 2020

Eclipse is the most popular IDE used for Java application development. The other popular options for Java development include IntelliJ IDEA and NetBeans.

Notes: It assumes that Java is already installed on the system. You may also be interested in How To Install OpenJDK 14 On Mac, How To Install Java 14 On Mac, and How To Install Java 8 On Mac.

Download Eclipse For Java

Open the Eclipse Packages Page to view the various Eclipse packages distributed by the Eclipse community. It lists the Java packages as shown in Fig 1.

Eclipse for Java - Mac - Downloads

Fig 1

Eclipse IDE for Enterprise Java Development and Eclipse IDE for Java Developers are the popular Java packages distributed by the Eclipse Foundation. We can install Eclipse using the package Eclipse IDE for Java Developers or installer for Mac OS X. I have highlighted both the download options in Fig 1. This tutorial provides the steps to install Eclipse IDE for Java Developers and creating the Hello World Project to print Hello Java !! on the console.

Click on the link Eclipse IDE for Java Developers to view the description, features, and download options as shown in Fig 2.

Eclipse for Java - Mac - Features

Fig 2

Click on the Mac OS X Link to view the download locations for Eclipse For Java Developers as shown in Fig 3.

Eclipse for Java - Mac - Download

Fig 3

Click the Download Button to start the download.

Install Eclipse For Java Developers

In this step, we will install Eclipse for Java using the image downloaded by us in the previous step. Now double-click the DMG file downloaded by us. It will show the mount progress and open the installer as shown in Fig 4 and Fig 5.

Eclipse for Java - Mac - Mount

Fig 4

Eclipse for Java - Mac - Installer

Fig 5

Now drag and drop the Eclipse to install it on the Mac machine as shown in Fig 6 and Fig 7.

Eclipse for Java - Mac - Drag

Fig 6

Eclipse for Java - Mac - Drag

Fig 7

It will start installing Eclipse on Mac as shown in Fig 8 and complete the installation as shown in Fig 9.

Eclipse for Java - Mac - Progress

Fig 8

Eclipse for Java - Mac - Installed

Fig 9

Now unmount the Eclipse Disk as shown in Fig 10.

Eclipse for Java - Mac - Unmount

Fig 10

This completes the installation of Eclipse on Mac.

Launch Eclipse and Configure Workspace

In this step, we will launch the Eclipse and configure the workspace. A workspace is a collection or library of projects and arrangements of the development IDE. The actual project location might be different than the workspace location. Launch the Eclipse IDE by double-clicking the application from the Applications Folder. It will ask to launch the IDE for the first time as shown in Fig 11.

Eclipse for Java - Mac - Launch Permission

Fig 11

Click the Open Button to launch the IDE. It will show the default Workspace to store the projects library and also provide options to change it as shown in Fig 12.

Eclipse for Java - Mac - Workspace

Fig 12

I have changed my workspace location as shown in Fig 13.

Eclipse for Java - Mac - Workspace

Fig 13

Now click the Launch Button to launch the Eclipse IDE with the selected workspace. It might ask to install the command line developer tools if not installed on the system as shown in Fig 14.

Eclipse for Java - Mac - Developer Tools

Fig 14

Click the Install Button. Also, accept the command line developer tools license as shown in Fig 15.

Eclipse for Java - Mac - Developer Tools License

Fig 15

Click the Agree Button to start installing the command line developer tools license as shown in Fig 16 and Fig 17.

Eclipse for Java - Mac - Developer Tools Progress

Fig 16

Eclipse for Java - Mac - Developer Tools Installed

Fig 17

Click the Done Button to close the installer. The Eclipse will show the Welcome Screen as shown in Fig 18.

Eclipse for Java - Mac - Welcome

Fig 18

Close the Welcome Screen. The default workspace looks like the one shown in Fig 19.

Eclipse for Java - Mac - Default Workspace

Fig 19

Hello World Project

In this step, we will create the Hello World Project and print Hello World !! on Console. Click on File -> New -> Java Project to start creating the project as shown in Fig 20. It will show the Create Java Project Wizard as shown in Fig 21.

Eclipse for Java - Mac - New Project

Fig 20

Eclipse for Java - Mac - Configure Project

Fig 21

Click the Next Button to continue with Project Settings as shown in Fig 22.

Eclipse for Java - Mac - Configure Project

Fig 22

Now click the Finish Button to create the Project. It will also ask to create the Module File as shown in Fig 23.

Eclipse for Java - Mac - Module Info

Fig 23

I have skipped creating the module as part of this tutorial. Finally, it will create the project and show it on the Projects Panel as shown in Fig 24.

Eclipse for Java - Mac - Project

Fig 24

Now we will create the java file HelloWorld.java. Right-click the src folder -> New -> Class to start creating the Java class file as shown in Fig 25. It will show the New Java Class dialog as shown in Fig 26.

Eclipse for Java - Mac - New Class

Fig 25

Eclipse for Java - Mac - Configure Class

Fig 26

Click the Finish Button to create the Java Class using the class package com.example as shown in Fig 27.

Eclipse for Java - Mac - Class File

Fig 27

Now update the HelloJava class as shown in Fig 28.

Eclipse for Java - Mac - Program

Fig 28

Now right-click the HelloWorld.java -> File -> Run As -> Java Application to compile and execute the program as shown in Fig 29. It will show the output on Console as shown in Fig 30.

Eclipse for Java - Mac - Execute

Fig 29

Eclipse for Java - Mac - Output

Fig 30

Summary

This tutorial provided all the steps required to install Eclipse for Java on Mac and also provided the steps to create the project and execute Java programs.

Write a Comment

Click on the captcha image to get new code.
Discussion Forum by DISQUS