CSE 115/503 - Spring 2011 - Banner
  • CSE 115/503 - Spring 2011
CSE 115/503 - Spring 2011 - Navigation

Lab 1
Last modified: February 01 2011 06:20:44 PM

CSE115 Lab 1

Introduction

In this lab you will primarily do some set-up of the development tool you will be using in the course, called Eclipse.  You will also learn how to extract a Java project from a CVS repository, and how to submit a Java project using Web-CAT.  This will ensure that you know how to do the basics with Eclipse and also how to submit your work in this course.


Log in

Your first lab task is to log in to your CSE computer account.

Beginning Your Setup of Eclipse

Last week you learned how to use some basic Linux commands to navigate and manipulate the directory structure.  Now you need to learn to run Eclipse. First open a terminal window and then type the following command to launch the program at the Linux prompt:

eclipse &

The ampersand '&' causes Eclipse to run in the background.  In practical terms this means that right after you press the

EnterKey.JPG or ReturnKey.JPG 

key, you get the Linux prompt back.

 

When you start up Eclipse, you will see a splash screen similar to this one:


Eclipse Splash Screen

Then you will see a window that will ask you which workspace you want to open. The workspace is the folder/directory where Eclipse keeps the files for your projects.  By default, it will probably say something like this:


Workspace Launcher

Be sure to check the box "Use as default and don't ask me again", and then click "OK".  After you click "OK" you will see a screen that looks like this:


Eclipse Opening Screen

Click on the arrow on the right-hand side (highlighted in screenshot above) to take you to the Eclipse workbench.  After doing this you will see the default workbench setup, shown in the screenshot below. The TAs will talk about customizing this and changing it around throughout the semester. You don't have to customize the Eclipse workbench, but we have some suggestions for making life easier when working on projects for this course.


Eclipse Workbench

Set up CVS repository link

During the semester we will provide you with Java code.  Sometimes the Java code is the starting point for one of your labs, while other times it will be code that we worked on in lecture.  But from where will get you get this code?

We will store such code in something called a code repository.  The kind of repository we will use is called a CVS repository, and Eclipse has some built-in tools to make it easy to extract code that's been placed into such a repository.  We do, however, have to tell Eclipse where the repositories are located.  To do that we have to do a little bit of set-up, described below.

Eclipse has different perspectives.  Each perspective shows you "views" (sub-windows) related to a particular task.  Your default perspective is likely the Java perspective.  We'll learn much about the Java perspective over the next few labs, but right now you want to set up access to our CVS repositories.  To do this, switch to the CVS Repository Exploring perspective, by first hovering over this icon:

OpenPerspectiveButton.PNG

highlighted in the screenshot below:

C:\Documents and Settings\alphonce\My Documents\Teaching\Fall2009\CSE115\Labs\Lab1\New Folder\HowToOpenOtherPerspective.gif

clicking on it, and selecting "Other..." from the menu that appears:

C:\Documents and Settings\alphonce\My Documents\Teaching\Fall2009\CSE115\Labs\Lab1\New Folder\HowToOpenOtherPerspectiveWithMenu.GIF

From the window that pops up:

OpenPerspectiveCVSRepExp.gif

select "CVS Repository Exploring", and click OK.  Your Eclipse window should now look something like this:CVSRepositoriesNone.gif

To add a new repository location, right-click in the "CVS Repositories" view (the selected view in the screenshot above), and select ... from the context menu which appears:

NewRepositoryContextMenus.png

After selecting this, a new dialog will open:

NewRepository-3.tiff

 

Here you need to enter the information for the CVS repository you want to make a connection to.  The information you need is the following:

Host: timberlake.cse.buffalo.edu

Repository path: /projects/CSE115/Repositories/Spring2011/LectureCode

Connection type: extssh

Pay attention to capitalization!  The window should now look like this:

NewRepository-4.tiff

In the Authentication section, enter your CSE username and CSE password.  Click "Finish" when done.

The repository you just added is for code that we work on in lecture.  You will also need to add a repository for the labs that you will work on this semester.  The information for that repository is:

Host: timberlake.cse.buffalo.edu

Repository path: /projects/CSE115/Repositories/Spring2011/LabSkeletons

Connection type: extssh

Once you've entered information for both repositories, you will see something like this in your "CVS Repositories" view:

If you encounter problems, ask your recitation TA for help.

Custom labels for the repository locations

The default labels for the CVS repositories are very long.  You can set custom labels.  Right click on the Labs repository, and select "Properties".

C:\Documents and Settings\alphonce\My Documents\Teaching\Fall2009\CSE115\Labs\Lab1\New Folder\CVSRepositoriesLongNamesWithRightClickMenu.GIF


This opens a window like this (make sure "CVS" is selected on the left):

 

C:\Documents and Settings\alphonce\My Documents\Teaching\Fall2009\CSE115\Labs\Lab1\New Folder\CustomLabelLabs.gif

 

Select "Use a custom label:" and type the name "Labs" in the text field.  Click "OK" to finish.

 

Now name the LectureCode respository "LectureCode".  Your CVS Repository Exploring perspective should look something like this:

 

C:\Documents and Settings\alphonce\My Documents\Teaching\Fall2009\CSE115\Labs\Lab1\New Folder\CVSRepositoriesShortNames.gif

 


NOTE: Some screenshots from here on in show years other than "Spring 2011". These screenshots were simply not updated recently; your screen should refer to Spring 2011 anywhere it is appropriate.


Getting a project from a CVS repository

The next thing for you to do is learn how to retrieve a Java project from the Labs repository.  Open the Labs repository (click on the icon to the left of "Labs"), and then HEAD (click on the icon to the left of "HEAD"); you will probably be prompted for a password:

 

CVSPassword.gif

 

Once you have successfully entered your CSE account password, click "OK" and you should see this screen:

 

 

 

To retrieve the SP2011-CSE115-Lab1 project that I have set up, right click on it, and select "Check Out" from the menu which pops up.

 

CVSLabsOpenCheckOut.GIF

 

Once finished, switch to the Java perspective; if you wish, you can open the project and see what's there.

 

 


Submitting your project to Web-CAT

The last main thing we want you to learn how to do as part of this lab is to submit your work.  In this lab this involved just submitting the project that you checked out from the Labs repository.

 

First, set up the Web-CAT's Eclipse submitter:  Windows->Preferences.  Cut and paste the following into the field marked "Assignment definition URL":

 

https://web-cat.cse.buffalo.edu:8443/Web-CAT/WebObjects/Web-CAT.woa/wa/assignments/eclipse

 

Enter your username in the"Default username" field.  When done, click "OK":

EclipseSubmitterPreferences.gif

 

In the Java perspective you should see the PackageExplorer view on the left of your screen.  Right-click on the project name "SP2011-CSE115-Lab1" and drag down to "Submit...".

Submission0.GIF

 

Once you have done this Eclipse talks to our Web-CAT server and gets information about available assignments that can be submitted to.  When I took the screenshot there was only this one CSE115 lab open for submission.  Since other courses use Web-CAT for submission too, it is possible that you will see other courses' assignments listed too.  Whatever the case, as long as Eclipse can communicate with the Web-CAT server this will open an "Electronic Submission" window:

 

ElectronicSubmission.gif

 

 

Select the correct one based on your lab session.  Enter your username (which may already be filled in – it will be the same as your CSE username) and your password, and then click "Finish".   Note that this is your Web-CAT password, NOT your CSE account password.  Your Web-CAT password was sent to you via e-mail, but if you do not still have this, you can go to:

 

https://web-cat.cse.buffalo.edu:8443/Web-CAT

 

to reset your password (click on the "Forgot your password?" link).  Note that you do NOT need to go to this website to submit your work – visit this website only if you need to reset your Web-CAT password.  Do NOT make this password the same as your CSE account password, as it is NOT encrypted.

 

If your submission was successfully sent to the Web-CAT server, you will see this window:

 

Submission1.gif

 

Once you click "Finish", if your submission was successfully received by the Web-CAT server you will see this in your Eclipse window:

 

Submission2.gif

 

Otherwise you will see a failure message.  This means your submission did NOT go through.  The most common problem is an incorrect password.  If this is the case, you must attempt your submission again.

 

Once your submission has been accepted by Web-CAT, you can click on the link shown in the screenshot above, and you will see a grading screen that looks something like this:

 

Submission3.gif

 

For this lab you will receive full credit if you are able to submit this project successfully, before it is due.  Late submissions will be penalized, and early submissions will be rewarded, as indicated in the course syllabus.  Due dates are listed on the course website.

Please note: At this time (as of the morning of 1/31/11) the grading module of Web-CAT is not functioning properly. Therefore, ALL submissions are receiving a grade of zero (0) - not because anyone has earned a zero, but because the grading component is not grading, so it is awarding zero points.


Due dates

This lab is due to be submitted by Sunday, February 6, 13, 2011 at 9:00pm for ALL recitation sections.

 

 

CSE 115/503 - Spring 2011 - Footer

Page maintained by Adrienne Decker

Contact: adrienne@buffalo.edu | 130 Bell Hall | (716)645-3184