Some clarification needed on the book, Maximum LEGO NXT

This is where you talk about the NXJ software itself, installation issues, and programming talk.

Moderators: imaqine, 99jonathan, roger

New User
Posts: 2
Joined: Sat May 19, 2007 5:45 pm

Some clarification needed on the book, Maximum LEGO NXT

Postby leaglealien » Sat May 19, 2007 5:57 pm

Hi everyone, especially Brian

My Lego Mindstorms-mad son ordered Brian's new book, with my blessing, because he's very computer-savvy and I was happy for him to learn Java and further his computer skills. (We are on a Mac, OS10.4.9,I should note.) I have spent Saturday morning going through the first few pages of the book with him, downloading Lejos (even though none of the available downloads state specifically that they are for the Mac, a problem in itself), setting up the admin privileges (though I wouldn't say they've been described very easily for the mac) and then, like others here, we came unstuck with the instructions on page 29.

From what I've been reading on this forum, it seems that there's a firmware issue, that the book is telling us to update our NXT bricks in a way that's not currently possible. Do I have that right? If so, why has the book been published and endorsed by Lego? If I have that wrong, why are we coming unstuck with the first basic instruction involving LeJOS?

In the meantime, we've reloaded the firmware through the NXT app.

Brian, can you reply direct without just linking to another thread?



New User
Posts: 2
Joined: Thu May 17, 2007 5:38 am

Brian's New Book

Postby jwalt3508 » Sat May 19, 2007 8:25 pm

I would like to add, If you think you're having trouble with the brick upload, wait till you try to upload to the brick using Brian's instructions on installing and using Eclipse!!!
There are steps missing and things in the wrong order.
I'm knowledgable with computers and though it's the first time I've used Eclipse, Ive been working at it for 2 days and still can't get it to upload to the NXT brick.
To Brian:
Can you redo your steps from scratch in setting up Eclipse and uploading the R2MeToo sample to the NXT and posting somewhere the CORRECT procedures.
If anyone else has been able to get this to work, would you please shed some light on this.
I believe that the book should be removed from publishing and revised before too many go out to would be fustrated readers.

User avatar
Site Admin
Posts: 392
Joined: Fri Aug 04, 2006 4:03 pm

Postby bbagnall » Sun May 20, 2007 4:58 am

I don't know what more I can say here other than to repeat what I've said in the other threads: the instructions are for the new release, which will be out soon. We are having some problems with leJOS NXJ working on some bricks and not on others, which requires Charles to do some trouble shooting using his oscilloscope. I had the option of including instructions to install the old outdated version or the new version that will soon be released. It made sense to me to release it with the new instructions so that's what is in the book. Yes, it is taking a little longer than we thought for the next release, but it is on the way. As the Hitchhikers Guide to the Galaxy says, Don't Panic!

I'd also like to be clear on something: Maximum LEGO NXT is not affiliated in any way with LEGO. It is not endorsed by them (the legalese in the book states this explicitly) so please do not attempt to write to them about anything to do with the book. It is not their problem and they certainly don't support leJOS.

Also, leJOS NXJ and the book are two separate entities. leJOS NXJ is a project by several programmers who do this in their spare time to offer it to the public for free. The book is a separate entity by myself that contains several projects to build and code using leJOS NXJ. I'm just one of many developers for leJOS NXJ and I don't control the schedule (more accurately, there is no schedule for leJOS NXJ). If you are tired of waiting for things to happen with leJOS and would like to see faster development, please join our developer team. We'd really like to have more quality programmers on board.

New User
Posts: 7
Joined: Mon May 21, 2007 3:28 am
Location: mass

Postby boozer » Mon May 21, 2007 4:16 am

First, a big thanks to Mr. Bagnall, Lawrie Griffiths and all who worked so hard to get the book out and LeJOS in general. My wife pre-ordered the book a long time ago and I, and clearly others, have greatly anticipated getting to work with it!

I tore into it Thursday night, took Friday off, and have spent all weekend trying to work it up. To further challange myself: my underdeveloped (BASIC/C++/FORTH) skills are rusty and I'm on a Panther (Mac OSX 10.3.9, JDK 1.4.2, w/ a dubious libusb)! And I've gotten most everything to work (with the exception of lejosdl)!! [lejosdl runs but when runjava is called a command not found error is generated btw. (more path and linking issues for another thread..]

I guess what should be clear is that this project does take some work and initiative on the part of the reader/user to figure things out. The book is not LeJOS NXT for dummies. I must admit that the style and presentation, on first skim (or two), made it seem like an easy process to be up and running in robot nirvana. Perhaps some care should be taken to see that it is not marketed as such. Clear updates, instructions, and feedback should be communicated to the readers in as timely manner as possible. Essentially, for the appearent target audience, this book needs tech-support.

All that said, I really like the book and the challenges it presents. After I spotted the command on p.29 and the eclipse tool creation instructions on p.33, I went straight to the net! By trolling the mail and news groups and doing some googles I was able to make great progress in a short time.

So, I think everyone should relax, breath deep, and work the problem.
As long as good communication is shared and an honest effort is given, success is sure to come!

Just keep the lines open and get those updates out as soon as possible.
Again, I appreciate the efforts of the book and urge a greater understanding.


New User
Posts: 6
Joined: Mon May 21, 2007 1:10 pm

Postby MeOl » Mon May 21, 2007 1:13 pm

If you want to get it running in the meantime, use this instructions, it worked fine for me on various macs:
(found at ... #entry7300 )
Well, I was able to get it to work! smile.gif Here's what I did -

1. Download and install libusb from
2. Extract the files and then go into the libusb directory
3. On the command line do:

sudo make install

4. Open the ReadMe.html file under the lejos directory, reference it first then do the following

cd build

5. Put the NXT into firmware mode
6. Pick a sample from the samples directory
7. If you picked HelloWorld do the following

lejoslink HelloWorld -o hello.bin
lejosdl hello.bin

Aaron R>

User avatar
Site Admin
Posts: 392
Joined: Fri Aug 04, 2006 4:03 pm

Postby bbagnall » Tue May 22, 2007 4:41 pm

Thanks for your comments, Boozer. I really expected us to have the next (easier) version out by now but we ran into an unexpected problem with some NXT bricks, and we really need Charles to troubleshoot it.

Trust me, leJOS NXJ will be very easy to install and use once we have the new version out, and you will have robot nirvana. I think what I'll do in the meantime is get some information on the publisher site (and maybe so people know what is happening.

New User
Posts: 11
Joined: Thu Jul 05, 2007 1:53 pm
Location: UK

Errata book p33

Postby bowser » Wed Jul 11, 2007 12:00 pm

Is there a step missing in the instructions for setting up eclipse:
1. create a project
2. give the project a name
3. set the classpath
4. add external jars
5. create external tools
6. create leJOS Compile
7. create leJOS Download
8. .."Click Add and add all three of the leJos NXJ tools." ...

But we never created the leJOS Link tool!
I am guessing that
the location is the '../bin/lejoslink.bat' file
the source dir is ${project_loc} or should this be the build file location?
and the arguments are ???

Any help gratefully received...

New User
Posts: 7
Joined: Mon May 21, 2007 3:28 am
Location: mass

Postby boozer » Wed Jul 11, 2007 4:52 pm


Here is the set-up for the link tool in eclipse:

Name: leJOSlink (or whatever you want to call it).

Location: C:\...\lejos_nxj\bin\lejoslink.bat

Working Directory: ${project_loc}

Arguments: ${java_name_type} -o ${java_name_type}.bin

Let me know if this works for you.


New User
Posts: 11
Joined: Thu Jul 05, 2007 1:53 pm
Location: UK

New Problem with Eclipse....

Postby bowser » Thu Jul 12, 2007 6:06 pm

Thanks :D , and I can see how that works now...
I think the arguments should have been...

${java_type_name} -o ${java_type_name}.lej

//the downloader is taking the argument

However when I try to compile with
Location : C:\lejos_nxj\bin\lejosjc.bat
Working Directory : ${project_loc}
Arguments : ${java_type_name}.java

I get :
javac: file not found:
Usage: javac <options> <source files>
use -help for a list of possible options

I was really hoping that eclipse was going to be as easy as everyone has been claiming, I have been using NetBeans for some time and have an ANT script which works for LeJOS NXT projects, even got it to work under linux and added a target to run the emulator. (In fact as long as you have ANT installed and set up correctly, you don't even need NetBeans... just enter the project directory and type 'ant', the script will clean, compile, build and download..)
I would really like to get this working in Eclipse because I would like to evaluate another IDE...

Any help still gratefully appreciated.

leJOS Team Member
Posts: 965
Joined: Mon Feb 05, 2007 1:27 pm

Postby lawrie » Thu Jul 12, 2007 9:23 pm

The development version of lejos has an ANT script for each of the samples, that compiles, links, uploads and runs the sample. It is identical for each sample and runs in Eclipse or from a Windows command window or Linux shell.

This will be in the next release (any day now - its nearly ready).

You just copy build.xml without any change to the directory containing your Java files. In Eclipse, you right-click on build.xml and do "Run As", "Ant Build".

We are using .nxj, not .lej for the file extension in the new release.

If you want to use external commands in the new release, that is simpler too. There is a new nxj command that links, uploads and optionally runs your program. You just need this and nxjc (renamed from lejosjc).

We decided to use the nxj prefix for commands to make it easier to run the NXT and RCX version of lejos on the same machine.

User avatar
Site Admin
Posts: 392
Joined: Fri Aug 04, 2006 4:03 pm

Postby bbagnall » Mon Jul 16, 2007 8:37 pm

Revised Installation Instructions for the Book

I just wanted to mention that the revised installation instructions are available from the book website: ... nxt-errata

New User
Posts: 2
Joined: Sat May 19, 2007 5:45 pm

Postby leaglealien » Sun Jul 29, 2007 10:03 pm


Glad to know the new version of NXJ is now out. Should Mac users download the LInux version?



User avatar
Site Admin
Posts: 392
Joined: Fri Aug 04, 2006 4:03 pm

Postby bbagnall » Mon Jul 30, 2007 3:33 am

For now, yes. We've had numerous Mac users who said they would provide us with an OS X build (universal preferably) but so far no one has actually come through. I'm going away for a few days but when I'm back I'll try to pester some Mac users for a build.

New User
Posts: 2
Joined: Sat Nov 24, 2007 9:21 pm
Location: Montreal-Quebec-Canada

ubuntu user succesfull

Postby bazmati » Thu Nov 29, 2007 8:01 am

Hi Brian and all member here who helped

Code: Select all

Upload successful in 5360 milliseconds

finely after successful firmware upload a few day ago.. i was today (well it 2:42 am now but...) today i for the first time managed to upload R2MeToo to my NXT... i can go to bed now, the new instructions provided for your book and all the tips here solved it for me.

Just wanted the community to know as of nov 2007 -- i'm successfull in using leJOS NXJ on ubuntu 7.10 via eclipse

Now to get Bluetooth working on Ubuntu and trying iCommand well thats another story but fist i will use NXJ via USB and recreate some of Brians robots.

Merci Thank you
Love your book
Marc-A --

New User
Posts: 1
Joined: Mon Apr 02, 2012 9:46 pm

Re: Some clarification needed on the book, Maximum LEGO NXT

Postby thomas92 » Mon Apr 02, 2012 9:47 pm

It's a true pleasure to see how helpful everyone is here at leJOS. :-) I've been lurking for a while and I just decided to sign up

memory foam mattress topper
oak bed frames

Return to “NXJ Software”

Who is online

Users browsing this forum: No registered users and 1 guest