The Commandwindow is not needed for firmware, nor for C or C#.
Needed for installing and flashing JAVA Lejos, and sometimes conveniant for other languages (Ruby)
(Icommand also, belonging to JAVA asks for a renewed struggle wit PATH, CLASSPATH, .jar's and other strange monsters. Problem: every laptop has to be configured again. If it works you tend to forget how it was done, because it is not something you reinstall everyday.)
Features of the command window
- in the command window, capital letters and lower case can be used
- if environmental variables are changed: close command window, to reopen it with the new settings
The commandwindow is a bit primitive, no direct copy paste, luckily if a command does not work with the arrows (UP) you can get the command back and correct is, in all other cases: retype!
- cd\ to go to the root
- to get into a folder cd (foldername), but also cd (foldername partial)* the wild card star
- cd.. with two points, to get back into a directory path one level
- dir to look at programs in the directory
- path to see the configuration of the path, for instance for JAVA: c:\java\jdk1.6.0_02\bin;c:\JAVA\lejos_nxj\bin
- echo %path% the same as path
- echo %classpath% gives CLASSPATH aan
- java (check for JAVA) gives a list of JAVA, otherwise configure PATH :c:\java\jdk1.6.0_02\bin
- copy and paste??? Hmmm: CTRL V doesn't work, but Yes: copy a command from somewhere and use in COMMANDWINDOW: right mouse-click and choose copy
Lejos Commands
When compiling with Eclipse (and not with the command window) the .bat file of Lejos finds it's way to the libraries
- lejosdl (check on installation of lejos) gives a list of commands, otherwise reconfigure PATH: c:\JAVA\lejos_nxj\lejosfirmdl to flash the firmware of lejos to the NXT (using USB)
- lejosc programName.java to compile a JAVA program, using the command window
- lejos programName to send the compiled programm to the lejos (no .class)
- set classpath , to check the classpath in the commandwindow
- java -jar icommand.jar checking the placements of the icommand.jar (although this is costing houres again, still not working, do I love the JAVA commandwindow combination?)
- error: Unable to access jarfile icommand.jar
- java %classpath% -jar icommand.jar
- error: Exception in thread "main" java.lang.NoClassDefFoundError: shwoing classpath
- in the JAVA directory: (first cd\ then in root C: cd java, java -jar icommand.jar
- error: Exception in thread "main" java.lang.NoClassDefFoundError: icommand.Properties, it seems to look for the icommand.Properties file, but cannot find it...hmmmm
- in Eclipse, he finally found the icommand.properties.
- device address is found in the bluetooth application (Bluesoleil with me)

0 comments:
Post a Comment