Using Eclipse for CS 371R:
Intelligent Information Retrieval and Web Search
This document describes how to get the class code and use it to start an Eclipse project. It assumes that you have used Eclipse before and that you are working on a CS lab, linux machine. The primary focus is on how to configure and run Eclipse for class project 0. We do not guarantee that you will be able to do everything in Eclipse for the later projects; however, it should always work well as a Java editor.
[A] Get the code:
- Make somewhere to put the class code. (e.g. mkdir ~/cs371r).
- At the command prompt, type: cp -r /u/mooney/ir-code/ir ~/cs371r/.
(You could also just get the .jar file posted on the webpage and then uncompress it with jar -xvf ir.jar.)
[B] Start an Eclipse project
- Run Eclipse (eclipse from the command prompt if /lusr/X11R6/bin/ is in your path).
- Open the project wizard with File -> New -> Project; Select: Java Project.
- Give your project a name and select "Create project from existing source".
- Fill in the directory where you copied the class code.
[C] Setup the environment
- You'll need to open the "Run Dialog" to set Command Line parameters and capture the console output.
- Create a new Java Application Launch Configuration and specify where to find the main method.
- In the Arguments tab, set the desired arguments.
- In the Common tab, designate a file where console output should go (this is what you will submit).
[D] Finish up and run it
For whatever reason, only text sent to System.out are captured by the output console. That means that your input will not appear in the log file. Fortunately, this is easy to get around. All user input go through the class: ir.utilities.UserInput. Open that file, find try...catch block in the readLine() method. Add System.out.println(input); just after the try...catch block, but before the input is returned. Now all data that are input, will immediately be output.