The Complete LeJOS NXJ Setup Guide (for Windows) Part 2

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
2,492
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jan 27, 2011

Part 1 is here: http://www.youtube.com/watch?v=hEFA0DdFhm8

This guide explains the entire setup procedure for LeJOS NXJ, a Java programming interface for Lego Mindstorms NXT, in 10 steps.

Step 9:
For every new Java (LeJOS) project that you create, you must select "Use project root for sourse and class files" and import the external JAR file "classes.jar" from the LeJOS bin directory.
Tools:
Name: NXJ Compile
Location: (browse to the LeJOS bin directory and select "nxjc.bat")
Working directory: ${project_loc}
Arguments: ${java_type_name}.java

Name: NXJ Download
Location: (browse to the LeJOS bin directory and select "nxj.bat")
Working directory: ${project_loc}
Arguments: ${java_type_name}

(Optional) Name: NXJ Compile
Location: (browse to the LeJOS bin directory and select "nxjbrowse.bat")
Working directory: (browse to the LeJOS bin directory)
Arguments:

Step 10:
Here is the sample program:

import lejos.nxt.*;
public class Example {
public static void main(String[] args) {
System.out.println("A test!");
Button.waitForPress();
}
} Remember to Subscribe and Rate this video! Post a comment if you have any questions.

  • likes, 1 dislikes

Link to this comment:

Share to:

Uploader Comments (Mindstormscreator)

  • Hello,

    thank you for the video.

    I have a problem. when at the last after writing the codes i try the nxj download it keeps showing me error saying "no nxt found is it switched on and plugged in?

    i tried reconnection and restarting it but so far its no use can you help me please

    :)

  • @357madox Restart your computer and make sure you installed the driver correctly.Then, try re-flashing the firmware onto the NXT, there might have been a transfer error from before. If that doesn't work, try installing a a slightly earlier version of leJOS on your computer and on the NXT.

  • I am getting error

    This is the error

    error: Class names, 'BasicMotorTest', are only accepted if annotation processing is explicitly requested

    1 error

  • @obiegryff Can you send me your code in a private message?

  • Nice guide. Thanks for the contribution to the community. Even though this guide is for Windows, I still am impressed. I guess most people use Windows instead of Linux anyways so it is more appropriately suited to be in Windows. Thanks

  • @mercedesbenzformula1 Thanks, and yeah most people use Windows anyway so I guess this guide is best for most people.

see all

All Comments (26)

Sign In or Sign Up now to post a comment!
  • I couldn't download the compiled program to brick. The error is:

    Failed to load USB comms driver: cannot load USB deiver

    (I did that step!)

    OS: windows 7 64

  • great video

  • Nice guide. Thanks for the contribution to the community. Even though this guide is for Windows, I still am impressed. I guess most people use Windows instead of Linux anyways so it is more appropriately suited to be in Windows. Thanks

  • @Damnshid Yes, that is possible, I do remember hearing things about leJOS only working on x86, you might want to try loading just x86 software including Java software since it should still work.

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more