I am a user of lejos_2_1_0 on MacOS X10.2 in Japan.
I tried to install the lejos_2_1_0 on MacOS X10.4(Intel & JDK1.5)
then I was able to build lejos_2_1_0 on it and go well lejosfirmld
but I have lejos command error when I download a sample program to RCX.
The details are as follows:
1) Unarchiving: to ~/Documents/javaworks/lejos2RCX/lejos_2_1_0
2) Setting the following environment variables.
- Code: Select all
export JAVA_HOME=/Library/Java/Home
export LEJOS_HOME=~/Documents/javaworks/lejos2RCX/lejos_2_1_0
export PATH=/usr/local/bin:$LEJOS_HOME/bin:$PATH
export CLASSPATH=$CLASSPATH:.:$LEJOS_HOME/lib/classes.jar:$LEJOS_HOME/lib/pcrcxcomm.jar
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LEJOS_HOME/bin:$LEJOS_HOME/lib
export RCXTTY=usb
3) Revising three files (Cf. the thread entitled "Errors with Makefiles (Linux and JDK 1.5 do not play nice)" by jon419 and eecharlie):
Change the line as
- Code: Select all
JAVAC=javac => JAVAC=javac -target 1.5
in "$LEJOS_HOME/Makefile" and
"$LEJOS_HOME/rcxcomm/rcxclasses/Makefile".
And add the line with semicolon next the line "done_pi:"
(maybe at line 324) in the file
"$LEJOS_HOME/vmsrc/threads.c"
as
- Code: Select all
}
}
done_pi:
;
#endif // PI_AVOIDANCE
}
4) Building lejos_2_1_0:
- Code: Select all
% cd $LEJOS_HOME
% chmod a+x cctest.sh
% make clean
% make
--- **I have the following message finally.**
- Code: Select all
====> Installation of leJOS done!
5) Downloading the firmware:
After connecting the LEGO IR tower to USB on my Mac
and turning on the RCX which is faced the tower,
type the terminal command as
- Code: Select all
% lejosfirmdl
--- **I have the following message finally.**
- Code: Select all
Use --help for options.
segment.length[0] = 13692 (14k)
segment.length[1] = 2940 (3k)
Total image size=16632 (17k)
Transferring "~/Documents/javaworks/lejos2RCX/lejos_2_1_0/bin/../bin/lejos.srec" to RCX...
100%
6)Testing a example:
- Code: Select all
% cd $LEJOS_HOME/example/hworld
% lejosc -target 1.5 HelloWorld.java
=>Then "HelloWorld.class" file is successfully created.
Note here that "lejosc" without flag "-target 1.5" cause a "target version" error in my Mac.
7) Linking and Downloading the example:
- Code: Select all
% lejos HelloWorld
=>Then the following error message is occurred:
- Code: Select all
Exception reading java/lang/Object
js.classfile.EClassFileFormat: Version not recognized: 49.0
at js.classfile.JClassFile.readMagicAndVersions(JClassFile.java:226)
at js.classfile.JClassFile.read(JClassFile.java:255)
at js.tinyvm.ClassRecord.getClassRecord(ClassRecord.java:427)
at js.tinyvm.Binary.processClasses(Binary.java:81)
at js.tinyvm.Binary.createFromClosureOf(Binary.java:258)
at js.tinyvm.TinyVM.main(TinyVM.java:109)
at js.tinyvm.TinyVM.main(TinyVM.java:100)
at js.tinyvm.TinyVM.main(TinyVM.java:217)
at js.tinyvm.TinyVM.main(TinyVM.java:251)
Similarly, I tried the link command
- Code: Select all
% lejos -o HelloWorld.bin HelloWorld
then I had the same error message.
What should I do?
Please anyone help me.

