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

Moderators: imaqine, 99jonathan, roger

New User
Posts: 6
Joined: Sat Jan 14, 2012 4:03 am


Postby abalis3 » Sat Jan 14, 2012 11:22 pm

I want to control 2 motors forward and backwards (Motor.A and Motor.B) totally seperate from each other but I cannot figure out Lejos at all. I followed a couple tutorials for using eclipse and creating a shortcut to a nxj compiler and nxj uploader but when I run the compiler i get the error:

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

I cant even figure out how to upload a simple program to move the motor forward with eclipse. Then once I figure out how to upload the program, I'd like some help with how you might actively control a motor from the computer with usb connection. I've read about programs on the nxt that listen for a connection but I cant even upload one onto it until i figure it out.

If I get help with uploading to the nxt, If someone could just write a simple program for actively communicating over usb to just like move motor.A forward until the program is terminated so i can see how its done.


leJOS Team Member
Posts: 1550
Joined: Thu Oct 30, 2008 4:54 pm

Re: Beginner

Postby skoehler » Sun Jan 15, 2012 12:44 am

I'm sorry to hear that. The good news is, that the tutorial you follows seems to be outdated. The leJOS Eclipse plug-in is a much easier way of doing things.
I'm updating the tutorial right now. An updated version of the tutorial will be released soon.

In the mean time:
Install the plug-in from this update site: Then create a new leJOS PC project using File -> New -> Project. Put your code in that new project, and run your application using right click on project -> Run As -> Java application.

New User
Posts: 6
Joined: Sat Jan 14, 2012 4:03 am

Re: Beginner

Postby abalis3 » Sun Jan 15, 2012 1:38 am

Ok im figuring that out now but in the mean time its ok because I can just compile and upload with cmd but now I would still like some help with just a program to control a motor from the pc

Posts: 381
Joined: Fri Jun 01, 2007 4:31 am
Location: Berkeley, CA

Re: Beginner

Postby roger » Mon Jan 16, 2012 2:57 am

Take a look at the documentation for the regulated motor here:
The example almost works, but use
Delay.msDelay(1000) ;
instead of
and ignore the
I recommend that motor control code runs on the NXT, not on the PC.
Good luck,

User avatar
New User
Posts: 12
Joined: Mon Jan 16, 2012 12:29 am

Re: Beginner

Postby kaczor » Mon Jan 16, 2012 3:04 am

roger wrote:I recommend that motor control code runs on the NXT, not on the PC.

I fully agree. It is harder to debug things, but this is right. leJOS for PC lacks for several features which work directly on the brick. I have some frustrating moments and then I've read some features are just not implemented in the PC leJOS environment.

Return to “NXJ Software”

Who is online

Users browsing this forum: No registered users and 4 guests