up previous next contents index
Next: Installing the Lejos operating Up: Installing Lejos onto your Previous: Installing Lejos onto your   Contents   Index

Setting up your environment

After extracting the Zip file contents, the next thing to do is to set up your environment. For Windows users, this really just involves two simple steps.

  1. First, you need to modify the PATH environment variable to include your Java JDK's bin directory and the Lejos bin directory.
  2. Second, you need to set an environment variable so the Lejos software will know where to find the infrared serial port. For USB systems on Windows, this means creating an environment variable like this: set RCXTTY=USB.

The way I personally deal with the second requirement is to create a batch file that I run from a DOS/Command window when I am ready to start working with Lejos. This file sets the RCXTTY variable mentioned above, as well as a LEJOS_HOME variable we haven't discussed yet, and the Java CLASSPATH variable that we also have not discussed yet.

Here are the contents of this file:

set JAVA_HOME=C:\j2sdk1.4.1_01
set LEJOS_HOME=C:\Java\lejos
set RCXTTY=USB
set CLASSPATH=.

I name this file lejos_setup.bat, and make sure I run it from the DOS window I will be working from before I start working with Lejos.


up previous next contents index
Next: Installing the Lejos operating Up: Installing Lejos onto your Previous: Installing Lejos onto your   Contents   Index