Hi,

I am trying Serial Port Communication in Linux using Javacomm API and RxTx. I'm configured RxTx as per the documentation. But I received an error as follows,

Exception in thread "main" java.lang.UnsatisfiedLinkError:com.sun.comm.SunrayInfo.isSessionActive()Z.

Would you help me please..

Hi,

I am trying Serial Port Communication in Linux using Javacomm API and RxTx. I'm configured RxTx as per the documentation. But I received an error as follows,

Exception in thread "main" java.lang.UnsatisfiedLinkError:com.sun.comm.SunrayInfo.isSessionActive()Z.

Would you help me please..

Did u configure it using this link http://www.agaveblue.org/howtos/Comm_How-To.shtml

I also tried this link and probally got the same message as error.
Which version of Linux are you using. I will suggest that you only use Rxtx API,(instead of using both JavaComm and Rxtx). For installation of that u can dowlnoad the binary from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip
and copy RXTXComm.jar to your jre/lib/ext folder and libRxtxSerial.so and libRxtxParallel.so in your jre/lib/i386 folder
This jre folder must be inside your jdk folder.

Also import gnu.io.* instead of javax.comm.* in your code

Did u configure it using this link http://www.agaveblue.org/howtos/Comm_How-To.shtml

I also tried this link and probally got the same message as error.
Which version of Linux are you using. I will suggest that you only use Rxtx API,(instead of using both JavaComm and Rxtx). For installation of that u can dowlnoad the binary from http://rxtx.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip
and copy RXTXComm.jar to your jre/lib/ext folder and libRxtxSerial.so and libRxtxParallel.so in your jre/lib/i386 folder
This jre folder must be inside your jdk folder.

Also import gnu.io.* instead of javax.comm.* in your code

Hi,
Thanks a lot. I got it. But in addition to that i just extract gnu from RXTXComm.jar and imported it into src location. Once again thanks a lot.

Hi,
Thanks a lot. I got it. But in addition to that i just extract gnu from RXTXComm.jar and imported it into src location. Once again thanks a lot.

Please clarify my doubt: What is the purpose copying RXTXComm.jar in \jre\lib\ext\ .

As per my knowledge if you want to import an external API than that API should be present at \jre\lib\ext jar so that the classes are recognised by the javac or g++ compiler.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.