Eclipse Development Environment

Eclipse IDE


Integrated Development Environments (IDE)

- Rather than using a standard text editor (e.g. WordPad) to write Java source files, we will use an IDE

- IDEs provide a platform combining tools such as editing, compilation, and debugging in a single system

- Some IDEs can be used to develop programs in other languages in addition to Java (e.g. PHP, C++)

- Some free IDEs such as CodeBlocks and Bloodshed Dev-C++ do not support the Java language

- There are a variety of IDEs that support Java development (both free open-source and proprietary)

- Examples of free Java IDEs include DrJava, BlueJ, JCreator, NetBeans, IntelliJ, and Eclipse

- A good comparison of IDEs for Java as well as other languages can be found here

- For this course, we will be using the Eclipse IDE (written mostly in Java)



Installing Eclipse



- We will install the Eclipse IDE and all of our assignments on a USB device you will need to bring to class

- Since the Windows lab machines have Java JDK 64-bit, we need to install Eclipse 64-bit on our USB

- Follow the instructions below and install the Windows 64-bit version on your USB device



- For online students, please read the following to install the correct version of Eclipse

- NOTE: To maintain consistency for our class, we will be using a specific version ONLY

- Please follow these directions exactly and install only the version indicated

- To begin the installation process, click on Eclipse (neon) IDE for Java Developers (shown below)



- Identify the operating system of your home machine from the list in the table

- Note that Eclipse is available in 32 and 64-bit versions for different operating systems

- NOTE: Be sure to select the correct version of Eclipse to match the Java JDK version installed

- Problems are likely to arise if there is a mismatch between 32/64 between Eclipse and JDK installs

- Once you've identified the correct version, click on the OS link and download the file to your desktop

- After the file is downloaded, simply extract the file in the same location (e.g. Desktop)

- Unlike other installation packages, you do not need to run a setup or installer program

- A folder is extracted with the same name (e.g. eclipse-java-neon-3-win32-x86_64)

- Inside this folder is a single folder named eclipse with everything contained within the folder

- Shown below, this folder contains the executable (eclipse.exe) you select to run Eclipse

- Move the entire eclipse directory to any desired location on your system

- You might want to create a shortcut of eclipse.exe on your desktop for easy access

- For on-campus students, copy this folder to your USB to use Eclipse in class



Launching Eclipse

- To launch the Eclipse IDE, double-click the eclipse.exe program located in the eclipse folder

- If Eclipse cannot find your Java installation (to execute the Java VM), you might see the following:

- This could also occur if there is a mismatch in bit versions (32/64) to the Java JDK

- First make sure you have installed the same bit versions (32 or 64) of Java JDK and Eclipse

- One solution is to specify the Java executable in an Eclipse initialization file

- In the eclipse directory, open the file eclipse.ini in a text editor (e.g. WordPad)

- Add the two lines in red below immediately before the vmargs specification

- Substitute the Java path shown below for your Java installation path













C:\Program Files\Java\jdk1.8.0_144\bin\javaw.exe





- Successful execution of eclipse.exe will prompt for a workspace location to store your projects

- This workspace is simply a folder that Eclipse will use to store created projects



- (on-campus) Create a folder named workspace on your USB, not the lab machines

- (on-line) You can use your default Users location (e.g. C:\Users\David\workspace)

- First time execution may bring up the Welcome screen below (which you can return to anytime)

- The menu item Help->Welcome will show this screen



- Click the ‘X’ on the Welcome tab to remove this screen and show the IDE environment (below)



- The next step is to become familiar with the Eclipse environment and create your first program

- Read and proceed through the Eclipse Help tutorial (also listed in the Schedule)