What am I missing here?!?! [SOLVED]

This is where you talk about the RCX software itself, installation issues, and programming talk.

Moderator: roger

What am I missing here?!?! [SOLVED]

Postby the.drizzle » Wed May 02, 2007 11:39 pm

Hiya!

OK, so I'm trying to get LeJOS up and running with an RCX 1.0 and the USB tower. I got firmdl to put the OS on the RCX without too much hassle, but I cannot seem to get anything else to work... In particular, I can compile all of the sample files (at least the ones I have tried), but whenever I try to transfer anything to the brick, I get the same problem:
Code: Select all
$ lejos HelloWorld
linking...
downloading...
read binary
  100%
download binary
Loading native libs
Unable to load native libraries: no jirtrcx in java.library.path
Exception in thread "main" java.lang.UnsatisfiedLinkError: josx.rcxcomm.Tower.close()I
        at josx.rcxcomm.Tower.close(Native Method)
        at josx.rcxcomm.Tower.closeTower(Tower.java:53)
        at js.tools.Download.close(Download.java:88)
        at js.tools.LejosdlTool.start(LejosdlTool.java:120)
        at js.tools.Lejosdl.start(Lejosdl.java:82)
        at js.tools.LejosLinkAndDownload.run(LejosLinkAndDownload.java:89)
        at js.tools.LejosLinkAndDownload.main(LejosLinkAndDownload.java:43)

and nothing happens. I'm using gentoo linux with a 2.6.20 kernel, and legousbtower is built as a module that is autoloaded at startup. Clearly, communication with the brick is possible, as firmdl works without any problems.

Why won't lejos as well?
Last edited by the.drizzle on Thu May 03, 2007 9:52 am, edited 1 time in total.
the.drizzle
New User
 
Posts: 9
Joined: Wed May 02, 2007 10:59 pm

Postby the.drizzle » Thu May 03, 2007 9:47 am

Well, I still don't quite know what is wrong with the bin/lejos shell script, but I've worked around it.

Basically, I have disregarded the echo CLASSPATH=xxx bit from the instructions, as the gentoo docs strongly discourage this practice, and it slated for removal.

Instead, I have simply added the LEJOS_HOME/bin path to /etc/profile for everyone, and created a small script that does:
Code: Select all
export RCXTTY=/dev/usb/legousbtower0
lejosjc <filename>.java && \
lejoslink -o <filename>.bin <filename> && \
lejosdl --tty /dev/usb/legousbtower0 <filename>.bin

which works like a charm!
the.drizzle
New User
 
Posts: 9
Joined: Wed May 02, 2007 10:59 pm

Postby mdsmitty » Fri Oct 26, 2007 3:39 am

I had the same problem but i took the shell script a little farther. Instead of entering the filename at each line i just use it as an argument.
Example: rcx HelloWorld

#!/bin/sh
lejosjc $1.java
lejoslink -o $1.bin $1
lejosdl $1.bin
mdsmitty
Novice
 
Posts: 78
Joined: Tue Feb 27, 2007 3:07 am

Postby lherrera » Sun Nov 04, 2007 1:22 am

The script .../bin/lejos is missing the LD_LIBRARY_PATH. So just adding:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LEJOS_HOME/bin

after check to $LEJOS_HOME fixes the link problem.
Luis
lherrera
New User
 
Posts: 1
Joined: Sun Nov 04, 2007 1:18 am
Location: USA


Return to RCX Software

Who is online

Users browsing this forum: No registered users and 0 guests

cron
more stuff