Here are the steps I took to get lejos running under Windows. Your mileage may vary, eh? - Jim Mahoney Jan 2007 1: install Java SDK from http://java.sun.com/j2se/1.4.2/download.html downloaded java SDK j2sdk-1_4_2_13-windows-i586-p.exe and installed to C:\j2sdk1.4.2_13\ See http://java.sun.com/j2se/1.4.2/install-windows.html 2: install LeJOS from http://lejos.sourceforge.net/p_technologies/rcx/downloads.php downloaded both 2.1.0 (2003) and 3.0_RC2 (release candidate 2, Sep 2006) and installed to C:\lejos\ unpacked to c:\lejos\lejos.3.0.0-RC2-win32 See http://lejos.sourceforge.net/tutorial/getstarted/firstbrick/win32.html 3: get driver for the USB tower on a windows machine, when you plug in the USB tower for the first time, it launches the "Hardware Wizard" to find the driver for that device. I got the driver from a CD that came with the robots, and copied the whole directory to c:/lejos/Tower on this computer. There's an app in that directory that'll also install it when double-clicked. 4: Setting up the environment variables. Created the batch file init.bat to set up the three needed environment variables : PATH, CLASSPATH and RCXTTY. --- init.bat ----------------------------- @echo off REM Just type 'run' from the Command Prompt to execute this. ECHO -- setting PATH, CLASSPATH, RCXTTY for Java and LeJOS -- SET LEJOS_HOME=C:\lejos\lejos_win32_2_1_0\lejos SET PATH=%PATH%;C:\j2sdk1.4.2_13\bin SET PATH=%PATH%;%LEJOS_HOME%\bin SET CLASSPATH=.;%LEJOS_HOME%\lib\classes.jar;%LEJOS_HOME%\lib\pcrcxcomm.jar SET RCXTTY=usb -------------------------------------------- I first tried using the 3.0.0-RC2 version. The "firmdl" command seemed to work, but complained about not being able to unlock firmware. The brick did show the battery level when finished, so probably it was working ... but given the error I just went back to the older version and haven't tested 3.0.0-RC2 further. The 2.1.0 version ran correctly (the second time; first time it gave an "error=-4" which I believe is a tower communication problem - the IR link is touchy). The whole session looked like this. (The USB tower was already plugged into the computer, the lego brick was turned on an placed near the tower, and the lights were turned off to avoid glare. The numbers displayed after firmdl runs give the voltage, which is different for the wall socket AC adapter vs batteries. Note that if the batteries are left in, then firmdl doesn't need to be run every time; however, if left unplugged without batteries, the brick reverts to its original firmware.) C:~> cd \lejos C:\lejos> init -- setting PATH, CLASSPATH, RCXTTY for Java and LeJOS -- C:\lejos> firmdl Segment 0 length = 13686 Segment 1 length = 2938 Deleting firmware Firmware deleted Downloading firmware 5% ( ... while the tower's green light turns on) Total image size = 16624(17k) Firmware downloaded Unlocking firmware Firmware unlocked C:\lejos> Then to compile, upload, and run the HelloBrick program : --- HelloBrick.java --------------- import josx.platform.rcx.*; public class HelloBrick { public static void main (String[] args) throws Exception { LCD.clear(); TextLCD.print ("Hello"); } } ---------------------------------- The commands are C:\lejos> lejosjc HelloBrick.java # creates HelloBrick.class C:\lejos> lejos HelloBrick # brick must be turned on %5 ... # brick counts code loaded C:\lejos> Finally, push "Run" button on the brick to display something like 'Hello'. Are we having fun yet?