Installing Software for
Java: Learning to Program with Robots

There are four basic steps to installing software to use with Java: Learning to Program with Robots. The steps outlined below and the software on the CD assume you are installing on a computer running Windows. If not, the basic steps still apply, but you will need to figure out the specifics on your own.

  1. Install the Java Development Kit. This is the software from Sun Microsystems, the creator of Java, that allows us to develop and run Java programs.
  2. Install the Eclipse IDE (Integrated Development Environment).
  3. Install the software that Java: Learning to Program with Robots uses in its examples, as follows:
  4. Integrate the software from the textbook with Eclipse so it can used in your own projects.

Here is how to do step 3, installing the textbook software:

1. Go to the CD that came with the textbook and open the directory named LibraryAndDoc. Alternatively, download to any directory on your C: drive, such as C:\temp, the following two files: Robots.exe and Robots.zip.
2. Double-click on Robots.exe. In the window that pops up, either browse to the folder H:\CSCE145\Robots\ or simply type that folder name into the field labeled: 'Unzip to folder:'. (If you are installing this on your own computer, then you should place this in the folder on your C: drive where your homework might be placed. I use C:\Huhns\CSCE145\Robots\ on my computer.) Click the Unzip button. A progress bar will appear at the bottom of the dialog box. When it has finished, a completion dialog will appear. Click OK and then click the Close button.
3. Use Windows Explorer to locate the folder named Robots and open it. It should appear as shown on the right, if the installation was successful.


Here is how to integrate the textbook software into your own Eclipse project:

1. Start eclipse. Then go to the 'File' menu and choose 'New' and then 'Project'.
2. Choose 'Java Project' and click next.
3. Name it ch01 and click next.
4. To add the jar file from the textbook to your library path, first click on the tab 'Libraries'. Click on the button 'Add external JARs'. Browse to find the becker.jar file and click Open. Now becker.jar is in your library path.
5. We need to include the documentation for the textbook software. Click on the plus next to becker.jar. Choose Javadoc location and click on the 'Edit...' button. Browse to find the documentation in .../Robots/doc/ and click OK. Now the documentation is set for Eclipse.
6. Finally click 'Finish' to make the project.
7. To add example files to the project, on Eclipse's main menu choose 'File', 'Import...', 'File System', and click on 'Next'. Then browse to, for example, ...\Robots\examples\ch01\deliverParcel, click 'Open', check the box next to 'deliverParcel', make sure 'Into folder:' contains ch01, and click 'Finish'. The files will be located in the default package.
8. To run a program, first double click on a .java file in the left Package Explorer frame, such as DeliverParcel.java. Then right click and go to the bottom where it says 'run as' and choose 'java application'.