Misc : Software Installation and Setup

Objective

This page will walk you through installing the software that you will need for the course. We’ll do the following:

  1. Install software we’ll be using for the class.
  2. Create an account on GitHub, which is a cloud service we use to distribute and collect your work. That account, or one you already have, must be tied to your WUSTL email address.
  3. “Accept” a repository for “Exercises.” You will use this repository throughout the semester.
  4. Add the assignment to Eclipse, which is the IDE we use for this course.
  5. Use Eclipse, which you installed in the first step, on the code in the repository, which you got in the third and fourth steps.

1. Installing Software

We will be using a language called Java to create and run code on our computers. Before you can execute Java code, you need to install two pieces of software:

  1. The Java Development Kit (JDK). The JDK includes a whole bunch of Java tools that are used to assist in the creation and execution of Java programs. Visit the link above to download the JDK and install it on your computer.
  2. Professional software developers use an Integrated Development Environment (IDE). As the name describes, it’s used to develop computer programs and it integrates several different useful features:
    • It includes a smart editor that helps you create and work with computer code.
    • It can work with other programs called compilers. Compilers translate the program you write into something the computer can run. The JDK that you installed included a compiler.
    • Other handy features, like support for debugging assistance. We’ll be using Eclipse, a popular IDE that supports programming in Java.

Below is a video authored by Prof. Bill Siever that takes you through the two steps. The links you need to accomplish those steps are as follows:

  1. The Java Development Kit (JDK) (do this first)
  2. Eclipse.

2. Create a GitHub Account

We will be using software called Git for “version control”. Version control systems (VCS) are a way of life in the modern software-development industry. They track how team members have changed a project, and they are particularly useful for collaborative projects, where multiple developers work concurrently on the same body of code. Below is a video explaining the concept:

We use the site GitHub to distribute and collect course work. GitHub is a place that hosts git repositories. You need to create a (free) account. Please visit GitHub and sign up for an account. Please use your WUSTL email address, although you can add multiple e-mail addresses. If you already have an account, please be sure to add your WUSTL email. These directions describe how to add additional email addresses.

3. Accepting the exercises

For each major type of course work you will need to generate a repository on GitHub. You’ll do so by clicking on a link and “accepting” an assignment. Click GitHub Logo HERE to accept the repository containing the course exercises and follow along with the instructions below.

  1. Carefully scroll through the list of names and select only your name!
    Select Name
    • You only need to do this one time this semester. After doing so, your GitHub account is associated with your name (for this course).
  2. Select the button to accept the exercises:
    Accept Assignment
  3. After accepting the exercises, a copy of the exercise materials, called a repository, will be made for you. Click on the link to view the repository:
    View Repository
  4. Finally, 1) click on Clone or Download and then 2) click the “Copy to Clipboard” button to make a copy of the URI shown.
    View Repository

You’ve now created an exercises repository and have the URI. You’ll need to do steps 2-4 many times this semester.

4. Add the exercises to Eclipse

  1. Open or go to Eclipse.
  2. Go to the File menu and select Import
    View Repository
  3. Expand the Git options and select Projects from Git
    View Repository
  4. Select Clone URI and then hit Next
    Clone URI
  5. The URI you copied when you created the assignment should automatically be used (if not, go back to GitHub, copy the full URI for cloning the repository, and paste it in here). Hit Next
    Select URI and Location
  6. Before you enter your username and password, you need to create a personal access token. To do this, click here to be taken back to the GitHub page for creating tokens.
  7. For the note, enter what this token will be used for

    Note
  8. Make sure the expiration is set to “never”.

    Note
  9. Select the repo checkbox. The other checkboxes can be left unchecked

    Repo checkbox
  10. Click the Generate token button

    Generate token
  11. Returning to Eclipse, enter your GitHub username and the token you just generated as the password. Do not use your GitHub password. (You should select Store in Secure Store so that you don’t have to re-enter your password every time you accept an assignment). Select Log in when ready

    Select URI and Location
  12. Select Next on the Branch Selection window.
    Select Branch
  13. Select Next on the Local Destination window.
    Select Destination
  14. Select Import existing Eclipse Project and select Next on the Project Wizard.
    Select Eclipse Project
  15. Select Finish.
    Select Eclipse Project

5. Using Eclipse on the exercises

To verify that your installation worked correctly, use eclipse to complete the following steps and run a simple program:

  1. Expand the exercises folder.
  2. Expand the src folder.
  3. Expand the exercises.exercises0 folder and double click on the Hello.java file. It should look something like this:
    Package Explorer

  4. Run the file by right-clicking on it, selecting Run As, and then selecting Java Application, like:
    Run Controller
  5. Once the program has finished running you should see a simple welcome message at the bottom of the window, this indicates that the installation was successful!
    Hello