Notes:
- You must have a CEC account to do this and all other labs.
- Account sheets were handed out the first day of class to students who were registered the week before school started.
- If you forgot your password sheet, go get another one at the CEC help desk.
- If you do not have an account, go to the CEC help desk and get one. You will need your ID.
- You may be tempted to do this on your computer, but you should try it on the CEC computers first. If you are in a CEC lab, then you should have a computer in front of you. If you are not, then you can use remote-desktop to mirage.cec.wustl.edu.
Professional software developers use an Integrated Development Environment (IDE) that includes a text editor (for creating source code), a compiler (for translating source code into executable code), and a debugger (for finding errors). In CSE131, we'll be using eclipse, a popular IDE that supports programming in Java.
Professional software developers also use a versioning repository to store their code, so that they can share their code easily and keep track of the changes they make. We will be using the subversion revsion control system. It will allow you to submit your code for grading and to share it with TAs who can help you with problems you might encounter.
This part of the lab explains how to get started using Eclipse with subversion.
We recommend using the default location, and checking the box so you won't be asked again.After Eclipse starts up, click the 'X' on the "Welcome" tab at the top to close the welcome screen.
When you get to the point of entering the full and complete location of the repository, copy and paste the line below as the repository's URL:svn+ssh://XXXXX@grid.cec.wustl.edu/project/cec/class/cse131/fall09/students/YYYY-ZZZZZZAfter pasting:
- Change XXXXX to your username that you use to log into cec computers. For example, jdl2.
- Change YYYY to your last name, exactly as it is shown in WebSTAC, with capital letters as shown, but without any quotes or spaces.
Examples:
- Smith → Smith
- de Erausquin → deErausquin
- O'Kelly → OKelly
- Be sure the hyphen – is still there, just after your last name and just before the ZZZZZZ.
- Change ZZZZZZ to your student id number, all 6 digits.
Please keep your ID number a secret! Your workspace is intended to be used by you alone at this point.OK, click Finish to get the repository location validated.
Be careful! If you provide a bad password repeatedly, your account will get locked out after a small number of such attempts. So be sure to follow these instructions carefully and ask if things are not working.
Those instructions next ask you to Check Out a copy of the repository location so you can do the work for this lab. Be sure to right click on the whole project (your name and ID number) to do the checkout. Do NOT click on things below that like src.
Try typing some random text in the file to introduce an error. You should see an error icon appear at the left. Note that sometimes the error message appears on the line after the error. At the bottom of the window, you'll see console and problems. The console window shows any printed output of the program. If you click on problems you'll see a list of the errors, and clicking on an item in the list will take you to the location of that error in the Java file so you can correct it.
Tip: Since RobotController.java was the program most recently run, you can run it again simply by clicking the green arrow on the toolbar at the top.Each time it runs, you should see the results of your most recent modifications.
Also, feel free to walk the route yourself, and stop by my office to say hello sometime. I have soda and candy to give away to visitors.
- If you pause with the mouse over a location on the map, the x,y coordinate of your mouse location will be shown on the screen. The RobotController file contains comments that talk about how to interpret the coordinates.
- After 20 minutes of successful robot navigation, don't spend much more time trying to get the robot to go exactly the right way. Get comfortable with controlling it for a bit, and then you can have it plow through the walls, juggernaut style. That's a bit easier and a lot more fun.
Now that you have modified a file, take a look at the Package Explorer window and you should see some > signs next to the files that have been changed. The > sign warns you that you have modified files that have not been committed back to the repository. The files will remain available on your CEC account, but they won't be visible by TAs or the instructor until you commit them.
You now know the basic steps to create projects, as well as open, edit, compile, and run Java programs in Eclipse. You should also have a basic understanding of sequential execution and how to call methods on ojects. Please ask if you have questions about any of this.
Be sure you have committed your work back to the repository as follows:Your lab is not due until Tuesday, but we are set up today to demo it with you if you want to get that out of the way. It will only take a minute or so.
- Right click on the project (your name-ID) in the Package Explorer
- Drag down to Team....Commit....
- You have to fill in some comment -- be creative.
- Click OK to cause your changes to be saved in the repository.
Follow the submission instructions to turn in your files and demonstrate your running program for a TA.