nxjc HelloWorld.java
Typically you would open a command prompt and execute this command in the directory in which you created HelloWorld.java.
nxjlink -o HelloWorld.nxj HelloWorld
This will create the file called HelloWorld.class. Unlike a real Java virtual machine, the leJOS firmware does not execute *.class files directly. The HelloWorld program needs to be linked, using the leJOS linker by the command above.
nxjlink -o HelloWorld.nxj HelloWorld
This will load the class HelloWorld (from HelloWorld.class) and all dependencies. The classes are then merged together into a single file, namely HelloWorld.nxj.
nxjupload -r HelloWorld.nxj
You can now upload it to the NXT brick to execute it.
All of the above was aquired (word for word at times) from here, in case I wasn't clear enough. Thanks!
~Eric

New Topic/Question
Reply



MultiQuote






|