2
votes

I am a java programmer in Korea(South). I have searched many google articles about these errors.

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

but I haven't solved it yet.

My eclipse build path setting is like this.

I added external jars from C:\dev\java\jdk_6\jre\lib\ext\RXTXcomm.jar

and Native library location for RXTXcomm.jar is C:\dev\java\jdk_6\jre\bin\rxtxSerial.dll

and I`m using springframework

Error

build has no error. and Tomcat v6.0 start has no error.

But when I try to use the component from jar, file error pops-up.

If anyone have a solution please give me a tip.

1
Welcome to Stack Overflow. I have fixed English issues with your post. I also formatted the error message using > - Rohit Gupta
Thank you!! But I don`t understand.....Are you saying you fixed wrong expression of my question?? - John K

1 Answers

0
votes

First I checked lib and bin directories of jdk and jre. There was many RXTXcomm.jar and rtxtSerial.dll in many directories. So I erased all of RTXTcomm.jar and rtxtSerial.dll.

Then I re-downloaded RTXTcomm.jar and rtxtSerial.dll from http://fizzed.com/oss/rxtx-for-java and put then in C:\dev\java\jdk_6\jre\lib\ext\RXTXcomm.jar C:\dev\java\jdk_6\jre\bin\rxtxSerial.dll and.. C:\dev\RXTXcomm.jar C:\dev\rxtxSerial.dll

after that I added java build path in my eclipse. Project > Properties > Java build path > library tab > add external jar

select "C:\dev\RXTXcomm.jar" > Native library location > edit select "C:\dev\rxtxSerial.dll"

Finally, It worked very well. I think the problem was jar file. I think it was corrupted.

(Sorry My English is not good. I hope you understand what I wrote.)