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.
Your first lab task is to log in to your CSE computer account.
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:
The ampersand '&' causes Eclipse to run in the background. In practical terms this means that right after you press the
key, you get the Linux prompt back.
When you start up Eclipse, you will see a splash screen similar to this one:
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:
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:
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.
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:
highlighted in the screenshot below:
clicking on it, and selecting "Other..." from the menu that appears:
From the window that pops up:
select "CVS Repository Exploring", and click OK. Your Eclipse window should now look something like this:
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:
After selecting this, a new dialog will open:
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:
Repository path: /projects/CSE115/Repositories/Spring2011/LectureCode
Connection type: extssh
Pay attention to capitalization! The window should now look like this:
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:
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.
The default labels for the CVS repositories are very long. You can set custom labels. Right click on the Labs repository, and select "Properties".
This opens a window like this (make sure "CVS" is selected on the left):
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:
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.
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:
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.
Once finished, switch to the Java perspective; if you wish, you can open the project and see what's there.
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":
Enter your username in the"Default username" field. When done, click "OK":
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...".
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:
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:
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:
Once you click "Finish", if your submission was successfully received by the Web-CAT server you will see this in your Eclipse window:
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:
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.
This lab is due to be submitted by Sunday, February
6, 13, 2011 at 9:00pm for ALL recitation sections.