Re: Java/rxtx on a slug
- Glad it works. I've also fixed the build for mipsel and powerpc targets.
--- In firstname.lastname@example.org, David Powell <david@...> wrote:
> It works perfectly. A million thanks!
> Brian Zhou wrote:
> > I just added rxtx to optware feeds (except mipsel and powerpc platforms, where the build fails). I've tested the cs08q1armel and unslung optware package and it works fine with the following start command
> > sudo jamvm -cp .:/opt/lib/java/RXTXcomm.jar \
> > -Dgnu.classpath.boot.library.path=/opt/lib/classpath/ \
> > -Djava.library.path=/opt/lib/classpath:/opt/lib TestSer
> > When the ipk gets into the feeds, try test and report back.
> > Regards,
> > -Brian
> > --- In email@example.com, David Powell <david@> wrote:
> >> Has anyone ever been able to get the java/rxtxSerial combination working
> >> on an NSLU2 running SlugOS/BE? I've tried everything I can think of,
> >> but keep hitting a wall. I finally got jamvm and jikes to work on the
> >> slug, but it keeps telling me that it can't find the librxtxSerial.so
> >> native library. I tried compiling the rxtxSerial library from source,
> >> but then it tells me it can't find the java.lang runtime files (why it
> >> needs java to compile a C .so file I don't know).
> >> I got jamvm and jikes to work by following the instructions at
> >> http://www.nslu2-linux.org/wiki/HowTo/SetupJavaToUseUSBSerial. But it
> >> fails when I run the test class. Here's the command I used:
> >> jamvm -cp .:/usr/src/:/opt/lib/RXTXcomm.jar
> >> -Dgnu.classpath.boot.library.path=/opt/lib/classpath/
> >> -Djava.library.path=/opt/lib/classpath/ Test
> >> and the output:
> >> java.lang.UnsatisfiedLinkError: Native library `rxtxSerial' not found
> >> (as file `librxtxSerial.so') in gnu.classpath.boot.library.path and
> >> java.library.path thrown while loading gnu.io.RXTXCommDriver
> >> Exception in thread "main" java.lang.UnsatisfiedLinkError: Native
> >> library `rxtxSerial' not found (as file `librxtxSerial.so') in
> >> gnu.classpath.boot.library.path and java.library.path
> >> at java.lang.Runtime.loadLibrary(Runtime.java:763)
> >> at java.lang.System.loadLibrary(System.java:670)
> >> at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:83)
> >> at Test.main(Test.java:5)
> >> The librxtxSerial.so file is in /opt/lib/classpath/, I swear!
> >> The reason that I need to do this is because I've built a solar water
> >> heater for my house, and have it heavily instrumented. The
> >> instrumentation board that I built communicates via RS232, and I want to
> >> be able to query it via the web for thermal, electrical, and historical
> >> data. The NSLU2 is perfect for this application, or would be perfect if
> >> I could get this problem worked out. I'm a very experienced Java
> >> programmer, but Linux and C, not so much.
> >> If anyone has an idea on how to fix this, I'm all ears! Beyond that, if
> >> someone can successfully compile the rxtxSerial library on SlugOS/BE and
> >> send it to me I'd love to try it.
> >> Thanks, David
> > ------------------------------------