LeJOS is an alternative operating system and programming environment for the LEGO NXT robots. LeJOS uses java as main programming languages and makes it thus very easy to program object-oriented and reuse old java code.


# apt-get update
# apt-get install libusb-dev gcj libbluetooth-dev ant
$ wget
$ tar -zxvf leJOS_NXJ_0.9.1beta-3.tar.gz 
$ mv leJOS_NXJ_0.9.1beta-3 ~/software/lejos_nxj (or something)
$ cd ~/software/lejos_nxj/bin
$ chmod +x nxj*
$ cd ~/software/lejos_nxj/build
$ ant
$ export PATH=/home/user/software/lejos_nxj/bin:$PATH (or put in /etc/environment)
# touch /etc/udev/rules.d/70-lego.rules
# echo "BUS==\"usb\", SYSFS{idVendor}==\"03eb\", GROUP=\"lego\", MODE=\"0660\"" << /etc/udev/rules.d/70-lego.rules
# echo "BUS==\"usb\", SYSFS{idVendor}==\"0694\", GROUP=\"lego\", MODE=\"0660\"" << /etc/udev/rules.d/70-lego.rules 
$ groupadd lego
$ useradd -G lego user

Remember to run eclipse as root(don't know why yet)