- Details
- Written by Nam Ha Minh
- Last Updated on 07 August 2019 | Print Email
This tutorial helps you get familiar quickly with Eclipse - the most popular IDE for Java development. In order to use Eclipse effectively, you should get familiar and understand some key concepts and components in the IDE: Workbench, Workspace, Perspective, Editor, View and Toolbar.First, let’s see how to download and install Eclipse IDE.
1. Download and Install Eclipse
Eclipse IDE is available on major operating systems: Windows, Mac OS X and Linux. It supports both 32 and 64-bit CPU architecture. Eclipse IDE is a Java-based application so it requires JDK/JRE installed first.You can download and install Eclipse in one of two ways: using an installer or download a ZIP package.
Download and Install Eclipse IDE using Eclipse Installer:How to install Homebrew on Mac. Moving to the main part — ”install Homebrew Mac” — we should explain that the installation method we describe uses curl to download the installation script. This method is the easiest and it’s recommended by the Homebrew team. The same applies to the process of uninstalling Homebrew. Download Windows Explorer 10 For Mac Download Eclipse C C++ For Mac Free Mp3 Download Everywhere Fleetwood Mac How To Download Apt-get Mac Citrix Workspace Mac Os Catalina Download Perfect Photo Suite 9 Mac Download Easycap Viewer For Mac Free Download Vuze Plus For Mac Free Download. I was going to say it was already present on my Mac (I've been running Eclipse for a while; Java came pre-installed), but I'm still running OSX 10.5 and it looks like Apple has given Java the boot::-(Java Deprecation. As of the release of Java for Mac OS X 10.6 Update 3, the Java runtime ported by Apple and that ships with Mac OS X is deprecated. Using Eclipse for Java Programming NOTE: Before using Eclipse for the first time, create a folder on your desktop named MyWorkspace. This folder will be used to store all of your Java projects. (Windows: Find it under All Programs in your start Menu. Macintosh: Find it under Go Applications in the Finder.) 2. Select a workspace. Go to the download folder, you would find a file named “eclipse-java-mars-2-macosx-cocoa-x8664.tar” (the file name may be different based on the version you download but it should be a tar file starting with word eclipse).
In this way, you download a small program called Eclipse Installer. Run this program and choose a package you want to install:
Then the installer downloads and installs the selected package onto your computer.The benefit of using Eclipse Installer is that you can install any desktop package of Eclipse in one place, and it also creates shortcuts on desktop and Programs menu for you. Here’s the link to download Eclipse Installer (64-bit):Note that you need to choose a mirror site to download from.
Install Eclipse IDE by downloading a ZIP package:In this way, you download a zip/tar file for a specific package and extract the file on your computer. Run the
eclipse.exeprogram in the
eclipse directory to launch the IDE:And if you want to have shortcuts on desktop and in Programs menu, you have to manually create them. Here’s the link to download the package Eclipse IDE for Java EE Developers:
Note: Eclipse IDE depends on JDK/JRE so make sure that you have JDK/JRE installed on your computer. and configure the
JAVA_HOME and
PATH environment variables properly (See: How to set environment variables for Java using command line).The above package requires Java 8 or newer.
2. Workbench
A window instance of the IDE is referred to as the
Workbench. A workbench window consists of one or more
Perspectives. And a perspective contains
Editors and
Views.You can open multiple workbench windows simultaneously (via menu
Window > New Window). For example, when you are working on two projects - you can open two workbenches - each for one project. But all workbenches are used for only one
Workspace.
3. Workspace
Workspace is a directory on your computer - where the projects are stored. You must choose a workspace when starting Eclipse:There can be one or more projects in a workspace - which means you can work with multiple projects simultaneously. However, you can work in one only workspace in a working session of Eclipse. And to switch to another workspace, click
File > Switch Workspace from the main menu.Eclipse stores preferences separately for each workspace in the
.metadatadirectory in the workspace’s root. That means each workspace has its own settings for layouts, JDKs, servers, etc.So you use a workspace to group related projects that share common settings. For example, you can create a workspace (create a directory) for developing an application that consists of several projects; a workspace for Swing projects; a workspace for Java EE projects; a workspace for Spring projects, and so on.The following screenshot shows multiple projects listed in the current workspace:
4. Perspectives
In Eclipse, a perspective provides initial layout that is organized to help programmers accomplish a task or work. Each perspective contains a different set of editors and views. For example, the
Java perspective contains the following editors and views:
- Java Editors: for editing Java source files.
- Package Explorer: allows you to navigate the projects.
- Outline: displays the structure of source file in the active editor.
- Problems: shows errors, warnings and problems detected.
- Javadoc: allows you to preview Javadoc of a class, method, field…
- Declaration: shows declaration statement for the variable at the cursor position.
- Task List: displays tasks downloaded from a popular bug tracker tool like Bugzilla, Mantis…
The following screenshot is of a Java perspective:When you are working in the perspective, you and open more editors and views when needed, but initially a perspective contains a fixed set of editors and views. The toolbars and menu items are also changed according to the purpose of the current active perspective.And this is the
Debug perspective that allows you to debug a running program:By default, Eclipse provides several perspectives, as shown below:You can see this list when opening a perspective from the menu
Window > Perspective > Open Perspective > Other…For Java development, you use only few perspectives most of the time, e.g. Java, Java EE and Debug. If you use version control, then you will frequently switch to
Git or
Team Synchronizing perspectives.In Eclipse, you can switch among opened perspectives by clicking on the perspective icons in the toolbar or by pressing the shortcut
Ctrl + F8. You can open perspectives in the same workbench window (default) or in new windows.Note that different perspectives can have different views but they all share the same editors.You can customize a perspective, e.g. arrange views and editors in the way you like, and save it as your own perspective.To reset the active perspective to its default layout, click
Window > Perspective > Reset Perspective…5. Editors
An editor allows you to edit a source file. For example, when you double-click a
.javafile in the
Project Explorer/Package Explorer view, a Java editor is opened in the editor area which is usually at the center of the workbench:Notice the gray border at the left margin of the editor area may show small icons to indicate errors, warnings, problems and information at the corresponding line.Each type of find can be opened with the associated editor. If Eclipse doesn’t have associated editor for a file type, it will try to open using an external program available in the operating system.There can be multiple editors opened and they are stacked in the editor area, but only one editor is active at a time. The name of the file is displayed in the title bar of the editor, and the asterisk (*) indicates that the editor has unsaved changes.In Eclipse, you can use the shortcut
Ctrl + F6 to switch among editors.
6. Views
A view allows you to navigate the information in the workbench. For example, in the
Project Explorer view, you can navigate the structure of projects in a workspace:A view also provides alternative representation to support an editor. For example, the
Outline view displays structural elements of the source file in the active editor. So if you are editing a
.javafile, it displays the classes, fields and methods of that file:Using the Outline view, you can quickly jump to an element in the source file.You can resize, move, minimize and maximize views in a perspective. A view can be detached from the workbench and becomes a floating window (right-click on a view’s title bar and click
Detach).A view has a pull-down menu that offers actions allowing you to customize the representation of the view. You can access this menu by clicking on the down arrow at the top right corner of the view. For example, the following screenshot shows the pull-down menu of the Project Explorer view:To open a view in Eclipse, click
Window > Show View. And to switch among opened views, press
Ctrl + F7.
7. Toolbars
The last visual component I want to tell you in Eclipse is the
toolbars. There are 4 kinds of toolbars in Eclipse:-
Main toolbar: appears below the main menu, the main toolbar consists of buttons that are grouped into different sections: Open/create/save project, Run, Debug, Navigation, Search…The buttons vary depending on the current perspective.
Eclipse Software Download
a
-
Eclipse Download Mac Os X
Individual view toolbar: a view can have its own toolbar in its title bar area or at the top-right corner. For example, you can see the toolbar of the
Servers view in this screenshot:-
Perspective switcher toolbar: this toolbar contains buttons that allow you to switch among opened perspectives in the workbench. You can see this toolbar at the right side of the main toolbar:It also contains a button (the left most one) that allows you to open the list of all perspectives.-
View stack toolbar: this is a special toolbar which appears when you minimize a view in a view stack. The icons on this toolbar allow you to open an individual view in the stack. For example, here’s the toolbar appears when the
ConsoleHow To Download Eclipse For Java On Mac
view is minimized:So far you have got familiar with the key concepts and components in Eclipse IDE. By understanding them, you know how to use the IDE properly and effectively.
Other Eclipse Tutorials:
About the Author:
Nam Ha Minh is certified Java programmer (SCJP and SCWCD). He started programming with Java in the time of Java 1.4 and has been falling in love with Java since then. Make friend with him on Facebook and watch his Java videos you YouTube.
Install Python and Java before installing Eclipse.
You may want to print these instructions before proceeding, so that you can refer to them while downloading and installing Eclipse. Or, just keep this document in your browser. You should read each step completely before performing the action that it describes. This document shows downloading and installing Eclipse on Windows 7 in Winter 2017.
Eclipse: (Neon)
The Eclipse download requires about 250 MB of disk space; keep it on your machine, in case you need to re-install Eclipse. When installed, Eclipse requires an additional 250 MB of disk space.
Downloading
- Click Eclipse
The following page will appear in your browser. In this handout we will download Eclipse IDE for Eclipse Committers for Windows 32 Bit; if your computer uses Windows, continue below; otherwise choose either Mac Cocoa or Linux instead.
It is critical that Java, Python, and Eclipse are either all 32 Bit or are all 64 Bit (and only if your Machine/OS supports 64 Bit): I think it easiest to use 32 Bit for everything.
- Click the 32-Bit (after Windows) to the right of the Eclipse IDE for Eclipse Committers.
You will see the following page (don't worry about the name of the institution underneath the orange DOWNLOAD button).
- Click the orange DOWNLOAD button. The site named here, in orange to the right of the button: Canada - University of Waterloo Computer Science Clupb (http) is the random one chosen by the download page this time; yours may differ.
This file should start downloading in your standard download folder, while showing a splash screen about donating to Eclipse. This file is about 250 Mb so it might take a while to download fully if you are on a slow internet connection (it took me about 5 minutes over a cable modem). Don't worry about the exact time as long as the download continues to make steady progress. In Chrome progress is shown on the bottom-left of the window, via the icon
The file should appear as
Terminate the window browsing the Eclipse download.
- Move this file to a more permanent location, so that you can install Eclipse (and reinstall it later, if necessary).
- Start the Installing instructions directly below.
Installing (for Python)
Python and Java should be installed before installing Eclipse- Unzip eclipse-committers-newon-2-win32.zip, the file that you just downloaded and moved.
On my machine (running Windows 7), I can - Right-click the file.
- Hover over the IZArc command from the menu of options.
- Click Extract Here
If you do not have IZArc or an equivalent unzipping program, here is the web site to download a free copy of IZarc.
Unzipping this file creates a folder named eclipse; unzipping 250 MB can take a few minutes. You can leave this folder here or move it elsewhere on your hard disk. I recommend putting the downloaded file and resulting folder in the C:Program Files directory.
- Create a shortcut on your desktop to the eclipse.exe file in this eclipse folder:
On most Windows machines, you can - Right-press the file eclipse.exe
- Drag it to the desktop.
- Release the right button.
- Click Create shortcut here
Now you are ready to perform a one-time only setup of Eclipse on your machine.
- Double-click the shortcut to Eclipse that you just created above.
The following splash screen will appear
and then an Eclipse Launcher pop-up window will appear.
In the Workspace text box, your name should appear between C:Users and workspace, instead of Pattis.
Leave unchecked the Use this as the default and do not ask again box. Although you will use this same workspace for the entire quarter (checking projects in and out of it), it is best to see this Workspace Launcher pop-up window each time you start Eclipse, to remind you where your workspace is located.
In fact, it is a good idea to create on your desktop a shortcut to your workspace folder; but you must click OK (see below) before Eclipse creates this folder and you can create a shortcut to it.
- Click OK.
Progress bars will appear as Eclipse loads.
Eventually the Eclipse workbench will appear with a Welcome tab covering it.
- Terminate (click X on) the Welcome tab.
You will not see the Welcome tab when you start Eclipse again, after this first time.
- Click Help (on the far right of the line below this window's blue title Java - Eclipse) and then click Install New Software... in its pull-down menu, as shown below.
The Install pop-up window will appear.
- Enter the text (or cut/paste from this document) http://pydev.org/updates into the Work with text box and press Enter (if that doesn't work, try http://www.pydev.org/updates).
In a few seconds the information under Name should change from
There is no site selected to Pending to
Select only the top PyDev checkbox; do NOT select the PyDev Mylyn Integration (optional) box.
Check before proceeding that the Install pop-up window appears as
- Click Next >
A new Install pop-up window will appear.
- Click Next >
A new Install pop-up window will appear.
Select the I accept the terms of the license agreement radio button, so the window appears as
- Click Finish
An Installing Software pop-up window will appear. During installation, it will show the various operations it is performing and a progress bar for each one. Because the installer is fetching various files online, this process might take a few minutes.
If you see a Security Warning pop-up window
Click OK.
The installation will pause, and a Selection Needed pop-up window appears.
- Check the box labeled Brainwy Software; Pydev; Brainwy.
Check before proceeding that the Install pop-up window appears as
- Click OK
The installation will finish (showing the final progress bars).
A Software Updates pop-up window will appear.
- Click Yes
Eclipse will terminate and restart. As you did in step 4, terminate (click OK on) the Welcome Tab.
- Click Window (to the left of Help on the far right of the line below this window's blue title workspace Java - Eclipse) and then click Preferences in its pull-down menu, as shown below.
- Drill down to select the interpreter:
- Disclose PyDev by clicking the + in front of PyDev or double-clicking PyDev (after the +); the + changes to a -.
- Disclose Interpreters by clicking the + in front of Interpreters or double-clicking Interpreters (after the +); the + changes to a -.
- Select Python - Interpreter.
The Preferences pop-up window should appear as follows - Click New... at the top-right of the top window
A Select Interpreter pop-up window appears.
Click Browse and the Open pop-up window should show you the folder in which Python was installed (here Python 3.6).
Double-click python.exe (or select it and click Open).
Change the Name in the Select Interpreter pop-up window to be simply Python36 (or whatever version of Python is installed). The Select Interpreter pop-up window should appear as
- Click OK.
A Selection needed pop-up window will appear.
Ensure that a check appears in all four checkboxes.
- Click OK.
The Preferences pop-up window will be changed to
On my system the path to the Python interpreter was so long, not all of it could be seen under Location
- Click OK.
A Progress Information pop-up window will appear.
During installation, it will show the various operations it is performing and a progress bar for each one. Eventually the installation will terminate.
If the following pop-up window appears
Ensure the 'Public networks, such as those in airports....' checkbox is NOT checked, and then click Allow Access.
- Click Window (to the left of Help on the far right of the line below this window's blue title workspace - Java - Eclipse), hover over Perspective then Open Perspective in the pull-down menu and then click Other... in the next pull-down menu.
The Open Perspective pop-up window will appear.
- Double-click PyDev (third from the bottom)
The blue label on the Eclipse window will change to workspace - PyDev - Eclipse, the Package Explorer in the upper-left tab will change to PyDev Package Explorer, and a PyDev icon will appear to the right of the Java icon.
- Right-click the Java icon to the left of the PyDev icon and select close
The Eclipse workbench will now have only the PyDev icon here and will look like
- Locate the workspace folder created in step 3 (see C:Usersyournameworkspace) and download the courselib.zip file into this workspace and unzip it there, producing the courselib folder; it should should contain a bunch of Python module files (ending in .py). From time to time you will be asked to put other course-specific Python module files into this courselib folder; these modules will be usable in all Python projects in Eclipse.
- Inform Eclipse to use the courselib folder in all Python projects.
- Terminate (click X on) the Eclipse window.
Eclipse is now installed for Python.