INFO

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.

INSTALLATION

# apt-get update
# apt-get install libusb-dev gcj libbluetooth-dev ant
$ wget http://downloads.sourceforge.net/project/lejos/lejos-NXJ/0.9.1beta/leJOS_NXJ_0.9.1beta-3.tar.gz?
r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Flejos%2Ffiles%2Flejos-NXJ%2F0.9.1beta%2F&ts=1356791160&use_mirror=heanet
$ 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)