Lab 1: Setting up

Part 1: Computation, Parallelism, Debugging and Testing (50 min)

Spring 2017: Handout

Part 2: Lab (60 min)

Checklist:


Eclipse Lab Setup Checklist


IT Issues


Setting up Piazza

Piazza web interface: Piazza

Don't spend too long on this. Use the web interface to read a message. Note that you can change the default settings so that you get a summary of daily emails.


Writing "Hello World" in Eclipse

  1. Open Eclipse
  2. If you are asked to select a workspace, check "Use this as default" and click "OK".
  3. If you are placed in the "Welcome" screen (6 fancy circular icons), click the arrow icon on the right that says "Go to the Workbench".
  4. Once you're in the code view, make sure you're in the right perspective by clicking the "Open perspective" icon in the upper right corner, selecting "Other..." and choosing "Java" and clicking "OK".
  5. Go to File >> New >> Java Project, give your project a name, then click "Finish".
  6. Right click your Project, go to New >> Class, give it a name, check "public static void main(String[] args)", and click "Finish".
  7. Now you're ready to write "Hello World". When you're ready to run it, right click your .java file (in the explorer on the left), go to Run As->Java Application.
  8. To make your program print something, add the following inside the main method braces '{}':
public static void main(String[] args) {
  System.out.println("Hello"); //<--- Add this line!
}

Committing your code (saving your progress)

  1. Right click your project, go to "Team" and select "Commit".
  2. Make sure all the files in the list are checked.
  3. Type an optional comment that reminds you of what you worked on in this project.
  4. Click "OK".

Importing a project from SVN into Eclipse (loading your project from your home computer or a lab computer once it's been saved)

  1. Open your SVN Perspective
  2. Expand the repository ending in your NetID (i.e. the one that is not _shared)
  3. Refresh the repository if you need to
  4. Right-click one of the folders (like Challenge1 when the first MP is released) >> Check Out

Demonstration and notes for the Lab Assistant

The SC0224 lab machines do have the subversion plugin pre-installed. Students will need to follow the Eclipse and SVN Instructions to install the plugin and add their repository. Note that Eclipse and Java are already downloaded.

If students bring a laptop, they can work on that instead. Note Java and and Eclipse downloads are available locally (see Eclipse and SVN Instructions.)

Warning: Lab assistants and a few late add students may not have svn repository access yet. If this happens get a list of netids and then submit a manager request email requesting access to https://subversion.ews.illinois.edu/svn/sp17-cs125/NETID.

Helpful Demonstration Notes:


Creating a Demonstration

  1. Create a new Java project 'TakeOverTheWorld'. Create a class with some println's and run it.
  2. Share it (at this point you'll need the URL https://subversion.ews.illinois.edu/svn/sp17-cs125/YOUR-NETID)
  3. Point out the following: Perspectives. Reset Perspective. (Make sure you're in Java Perspective).
  4. Point out Package and SVN Repository View.
  5. Point out compile errors and svn status in the Package View.
  6. Perform a commit. Delete project locally (after checking for the lozenges).
  7. Checkout entire project using SVN Repositories View.
  8. Discuss working with two machines. Importance of no compile errors. Problems view is updated when files are saved.
  9. Point out - you can open https URL in a web browser to help debug problems.