Nxt is a project mainly written in Java, it's free.
Code from our first year robotics module.
This repository contains code we wrote for a first year course in robotics. We used Lego NXT robots that were flashed with Lejos. The code is messy but a good starting point for understanding how to program NXTs in Lejos.