Java Programming for Lego RCX Robots using Eclipse 2.1.3

Installation

  1. Install RCX or Robolab software to install the divers for for your USB IR Tower (You can skip this step if you have already installed RIS or Robolab) Note that RIS 1.x only supports the serial tower. RIS 2.0 supports both the serial and USB towers.
  2. Download Java J2SE SDK from java.sun.com/j2se/1.4.2/download.html. Installation may take 4-5 minutes.
  3. Dowload leJOS Version 2.x.x from lejos.sourceforge.net/download.html
  4. Extract downloaded leJOS ZIP file to a directory (eg. C:\lejos). When doing the unzip, specify unzip folder to C:\. Unzipping program will build the "lejos" directory for you.
  5. Download eclipse 2.1.3 from archive.eclipse.org/eclipse/downloads/index.php (Please note that this instruction on this page is not for 3.x.x)
  6. Extract downloaded eclipse ZIP file to a directory (eg. C:\eclipse) When doing the unzip, specify unzip folder to C:\. Unzipping program will build the "eclipse" directory for you.
  7. Download the following zip-bundle for Eclipse plugin org.lejos_1.0.2.zip
  8. Unzip it into your eclipse plugin directory. The unzziped files go into c:\eclipse\plugins.
  9. Go to C:\eclipse folder. Create a shortcut on your desktop by double-clicking eclipse.exe. Launch Eclipse by double-clicking the shortcut on your desktop. It will take 2-3 min. to launch. So wait.
  10. When Eclipse is opened, go to the leJOS preference page, by selecting Window->Preference->Lejos page. (or LeJos->Preference) Specify leJos installation folder, RCX comm port, and Data Transfer Rate as shown below as an example.

Writing Hello World Lejos Java Program Using Eclipse