Eclipse is a widely used IDE primarily for Java development. Eclipse is also used for C and C development as well as PHP among the other programming languages. Eclipse IDE is written in Java. It mainly consists of a base ‘workspace’ and a plug-in system so that we can add more plugins and extend the functionality of the IDE.
Eclipse Ide FreeIBM's Eclipse is a program that is used to write applications (other programs) in a variety of programming languages. It allows you to complete many distinct program development steps in one place (program window). A program which allows you to do this is known as an integrated development environment, or IDE.
- Text File Encoding. The default setting for saving files in your Eclipse workspace is to use the file.
In this course, Eclipse is used for writing programs in Java. There are several steps that must be completed to set up Eclipse and further steps to start up a new Java project (set of Java components which work together to make up an application). This tutorial explains each step with words and graphics from the Eclipse IDE.
This tutorial will help you to become familiar with the Eclipse IDE. You can navigate through the tutorial step-by-step by clicking on the and links at the top and bottom of each page. You may also use the index to jump directly to the specific step that you wish to review.
IndexHere is a brief description of each step in this tutorial. The underlined word in bold is used as the link label throughout the tutorial. Though most of the images are taken from a different version of windows (not XP), they are very similar to what you'll see.
Eclipse Ide Introduction
|Start||The start of the tutorial (top of this page).|
|AT HOME WINDOWS 7 USERS||Step 0: WIN 7: How to create a shortcut to Eclipse.|
|Launch||Step 1: How to launch the Eclipse IDE.|
|Config||Step 1b: Set Suggested Editor Preferences|
|Create||Step 2: How to create a new programming project.|
|Edit||Step 3: How to edit an existing project.|
|Run||Step 4: How to run your program. This also includes building or compiling your project.|
Change folder options to display file extensionsYou only need to do this once in the course, but both partners should do it. Files in windows include extensions to let the computer know what sort of file it is. For example, a file could be an image, a java program, a website, or a text document. Windows assume the average user does not need to see the extension, but as computer scientists, we want more control over our computers and the files saved on them.
- Click on the button on your desktop.
- Select Computer from the menu.
- Click the 'Organize' menu and choose 'Folder and search options...'
- A new window titled Folder Options will appear, click on the View tab.
- Check the box next to 'Display the full path in the title bar (Classic theme only)'.
- Uncheck the box next to 'Hide file extensions for known file types'.
- Click OK to exit and save the change.
- Click the close window button in the upper right hand corner of the Control Panel to close the window.
After you downloaded the Eclipse package from Eclipse.org, be sure to uncompress the contents of the file. Note that at the time of this writing (Fall 2014) the latest version is 4.4 codenamed Luna. (As of 9/29/14, 4.4 was not yet available for Mac user). The 4.2.2 codenamed Juno (or 4.3 Kepler) will also be fine in case you have already downloaded the previous version of the software. Uncompressing is also known as (unzip untar unpack) and you can usually do this by right-clicking the file name and selecting unzip.
Remember where you uncompressed the files to, and find the file named eclipse.exe (WIN 7).
In Windows 7:
The Eclipse application was not automatically added to your Start menu, the next few steps will show you how to Pin (WIN 7) Eclipse to your taskbar (or you can choose to pin to the Start menu). There are similar ways to create shortcuts in MAC/Linux installations.
- Right-Click on the button in the lower left corner of your desktop.
- Select the Open Windows Explorer option.
- If you look enough, you should be able to find the Eclipse.exe file in the Eclipse folder that was created when you extracted the Eclipse files from your download.
Eclipse.exe highlighted' width='400' >
- Right-click the Eclipse.exe file and drag (without releasing) to the Start menu or task bar. Release when you have pinned this program shortcut where you like. This will create a shortcut for launching Eclipse.
This step will show you how to start the Eclipse program on the Windows 7 operating system.
LAB USERS: You can find a link to the Eclipse program in the start menu. Click this link to launch Eclipse and then follow instructions for setting the Workspace location. Note that there may be more than one versions of eclipse installed. This tutorial has screen shots of the Luna version (4.4)
AT HOME OR LAB USERS:
- Click your newly created shortcut to launch Eclipse. When you launch Eclipse, you will be shown the following splash screen while it loads, which can take a few minutes:
- After launching Eclipse for the first time, it will first ask you for a workspace location with an image like the following:
A workspace is a folder on your local drive (home users) or the network (lab users) where the files created by Eclipse will be stored. When you create a new programming project, several files are created and Eclipse will organize them within a new folder that is within the workspace folder you select.
Enter the location (on your home computer or on the network) where you wish to store all files created by Eclipse projects.
CS WINDOWS LAB USERS: Enter in the following location L:privatecs302programs and make it so that this is the default choice, as in the following image:
CS LINUX LAB USERS: Use the following location /u/c/s/cslogin/private/cs302/programs.
NOTE: /u/c/s/cslogin is different for each user. If your login name is badger, your user folder is found at /u/b/a/badger.
- You will then be presented with a welcome workspace like the following (version 4.4):
You can optionally explore the various icons as you wish. The next time you run Eclipse, you will not be shown this welcome screen, but all of the information it contains can be found elsewhere. Or, you can open it again via Help → Welcome.
When you are done, close the Welcome pane by clicking the X on the tab labeled Welcome(towards the top left of the Eclipse window), then continue to the next step of the tutorial and use the Eclipse IDE to develop your Java programming project.
An empty Eclipse workspace looks like this.
Configure: Set Suggested Eclipse Window Preferences
1. Open the preferences dialog window
- Click Window in the Eclipse menu bar
- Click Preferences
2. In the preferences dialog, set these preferences
- Expand (click) General
- Expand (click) Editors
- Click Text Editors
3. In the Text Editors option panel
Eclipse Development Ide
- Check the box to select [turn on] each of these options:
- Insert spaces for tabs
- Show print margins
- Show line numbers
- Set Print Margin column to 80.
- See Colors and Fonts if you wish to change the display of your editor window.
- Click [Ok] to save your selections.
Once set, your Text Editors preferences window should look like this:
Original version created by Deb Deppeler and Sue Hazlett
Updated for Eclipse by Martin Hock
Updated for lab section use by Beck Hasti
2008-2012 Updated by Jim Skrentny
2012 Updated for v4.2 by Deb Deppeler
2013 Updated by Nick Pappas
2014 Updated for v4.4 and added Editor Preferences by Deb Deppeler