Recitation R1
- Introduction to Linux and Eclipse
Fall 2014
CS200: Introduction to Algorithms
The goals of this lab are as follows:
- TA introduction and attendance
- Discover the class website
- Get Eclipse up and running
- Start on a simple Java program
- Learn to submit programs
Logging In
- Login to the machine using your electronic ID (same username that you use for RamWeb).
- The initial password should be your student ID (same as nine digit number on your RamCard).
Troubleshooting:
- Raise your hand if you cannot login!
Class WebSite
- Start your preferred internet browser and type in the url www.cs.colostate.edu/~cs200.
- Look at the syllabus and progress pages.
- Find the lab instructions for today.
- Open another tab and type in the url ramct.colostate.edu.
- Login on RamCT using your EID and password and make sure you can see CS200.
Launching Applications
- Click on "Activities" in the upper left corner of the screen
- Click on "Applications"
- Run firefox, gedit, file manager, and a terminal.
- The terminal command brings up a window where you can type in Linux commands, similar to using DOS command prompt on Windows.
Using Eclipse
Eclipse makes programming easier by compiling and running your programs in a single step.
Your TA will go over setting up Eclipse and your workspace.
- To start Eclipse, open a terminal window and type "eclipse.sh".
- You must do this every time you launch Eclipse.
- Close the window that welcomes you to Eclipse.
- Select the Window→Open Perspective→Java.
- You can change perspectives as need be to fit your workflow.
- If your perspective ever gets messed up, you can reset your perspective by going to Window→Reset Perspective.
- Close the "Welcome" window if it doesn't disappear automatically.
- Create a default comment header by going to Window→Preferences→Java→Code Style→Code Templates→Code→New Java files
and putting a line for file name, your name, the class, and your email.
Your TA will guide you in creating a project called P0 and exporting a .jar file.
- Creating a new project:
- Create a new project using the File→New→Project, and name it P0.
- Add the Two .java files LinkedList.java and Node.java to your src directory.
- You can now run your program by clicking the green "Play" shaped button on the toolbar.
- Note that the output will appear in the Console window at the bottom.
- You should see the program print a String representation of the linked list from the nodes added in the main method on the first line of the console.
- For detailed tutoring on using Eclipse, check out the website:
Eclipse.
Program Submission via Checkin
Your TA will now walk through logging in to the course website, submitting your code,
and viewing preliminary test results. More information on submitting assignmens can be seen by clicking this link.
© 2014 CS200 Colorado State University. All Rights Reserved.