Just registered here, need to ask a question.
I have worked with leJOS in high school (using Windows XP 32-bit) and never had any problems.
After spending most of the day yesterday trying to get leJOS set up on my Windows 7 64-bit, I have made some progress - now I am having other problems.
I have posted the code and the error at the bottom of this post.
I am using:
Eclipse SDK / Version: 3.7.1 / Build id: M20110909-1335
And, I have installed the leJOS NXJ plugin for eclipse.
This is a 64 bit machine, but I currently am using Java 32 bit:
- Code: Select all
java version "1.6.0_30"
Java(TM) SE Runtime Environment (build 1.6.0_30-b12)
Java HotSpot(TM) Client VM (build 20.5-b03, mixed mode, sharing)
I have tried both Bluetooth and USB.
I used the leJOS installer and NXJ_HOME is located in C:\Program Files (x86)\leJOS NXJ.
I have checked several resources, including:
A) the documentation
B) http://nxtemplar.blogspot.com/
C) others...
PLEASE let me know if there is any more information I can give.
The "LEGO MINDSTORMS NXT 2.0" application does upload - but I am much less comfortable here.
I am curious if this is a problem with my brick or with my Eclipse configuration or something with leJOS.
Thanks in advance!
- John
Below is my (very basic) code, and this is configured in Eclipse as a leJOS project.
- Code: Select all
package main;
import lejos.nxt.Motor;
public class MoveMotorA {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Motor.A.forward();
}
}
- Code: Select all
Linking ...
Program has been linked successfully
Uploading ...
BlueCove version 2.1.0 on winsock
leJOS NXJ> Connected to NXT
java.io.IOException: OPEN WRITE failed
at lejos.nxt.remote.NXTCommand.openWrite(NXTCommand.java:179)
at lejos.nxt.remote.NXTCommand.uploadFile(NXTCommand.java:450)
at lejos.pc.tools.Upload.upload(Upload.java:51)
at lejos.pc.tools.NXJUpload.run(NXJUpload.java:93)
at lejos.pc.tools.NXJUpload.start(NXJUpload.java:36)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at lejos.pc.tools.ToolStarter.startTool(ToolStarter.java:31)
at lejos.pc.tools.NXJUpload.main(NXJUpload.java:29)
BlueCove stack shutdown completed
uploading the program failed with exit status 1
