[Rxtx] Linux: UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()
Uncle George
netbeans at gatworks.com
Thu May 24 06:38:55 MDT 2007
1) I got rxtx-2.1-7r2.zip, which I suppose is the last official release.
2) ./configure
3) make
4) moved RXTXcomm.jar to /usr/local/RXTX/2.1
5) moved .libs/*.so to /usr/local/RXTX/2.1
then run project:
>
> RXTXCommDriver {}
> java.lang.UnsatisfiedLinkError: gnu.io.RXTXCommDriver.nativeGetVersion()Ljava/lang/String; thrown while loading gnu.io.RXTXCommDriver
> java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver
> SerialPort_NMEA_GNU:SerialPort_NMEA_GNU
> java.lang.NoClassDefFoundError: Could not initialize class gnu.io.RXTXCommDriver thrown while loading gnu.io.RXTXCommDriver
> GpsData_Device: jGPS/GpsData/DeviceDrivers/SerialPort/SerialPort_NMEA.class
> NoClassDefFoundError javax/comm/SerialPortEventListener
> GpsData_Device: ignoring jGPS/GpsData/DeviceDrivers/SerialPort/SerialPort_NMEA.class
> BinaryDriver.open(); Unable to open/locate /dev/ttyUSB0
After a lot of *&$#&$@&$^ I saw that there is no nativeGetVersion() in
librxtxSerial.so.
seems like the linker failed.
seems like the -rpath got the wrong path
seems like RXTX_PATH failed to get set.
seems like configure.in/configure does not check for java 1.6!
> 1.2*|1.3*|1.4*|1.5*)
> #fix_parameters $JPATH/jre/lib/javax.comm.properties
> CLASSPATH=".:\$(TOP):\$(TOP)/src:"`find $JPATH/ -name RXTXcomm.jar |head -n1`
> JHOME=$JPATH"/jre/lib/ext"
> RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)"
> ;;
seems like there is no error if RXTX_PATH is not set :{
More information about the Rxtx
mailing list