Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Parallel and Serial Comm Using Java Comm API on Linux OS System

 
vijay _kumar
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am Vijay.
I want to implement Parallel and Serial Communication using Java Comm API on Linux System. I am using RXTX Package from "www.rxtx.org" along with the Java Comm API. I have installed the Java version of Linux (java for Solaris/Sparc) on Linux System. I have also installed Java Comm API and RXTX Package on Linux System.
But whenever i run my program, i face some exceptions related to the port communication as following:
CommControlException
at CommControl.portOpen(CommControl.java:137)

Even When i run SerialDemo application that comes with the Java Comm API, it throws following error:

java.lang.VerifyError: (class: gnu/io/RXTXPort$SerialOutputStream, method: flush signature: ()V) Illegal use of nonvirtual function call
at gnu.io..RXTXPort.<init>(RXTXPort.java)
at gnu.io..RXTXCommDriver.getCommPort(RXTXCommDriver.java)
at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:634)
at SerialConnection.openConnection(SerialConnection.java:99)
at SerialDemo.actionPerformed(SerialDemo.java:267)
.........................

Please tell me what are the actual steps to configure JDK, Java Comm API and RXTX Package. Which versions of all these i should use.

As i am new to the Linux OS, Please also tell me what are the various steps to configure communication (Serial and Parallel) ports on Linux Machine.


Please help me to resove this problem as earlier as possible.

Thanks in advance.

Vijay
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all the exception you are getting means that the demo is compiled with another version of the library (the signature of the method is not existent in the library version you are using). You should look in the API to see how it was changed.

cheers,
--
./pope
[the_mindstorm]
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by vijay _kumar:
Please tell me what are the actual steps to configure JDK, Java Comm API and RXTX Package. Which versions of all these i should use.


Vijay, I am pretty sure that RXTX is not from the standard JDK and you need to consult with the documentation coming along with the package to tackle the difficulties related to that package... You need to know about the minimum JDK requirement for that package so that it will be compatible...

Hope this helps...
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34681
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"vijay _kumar",
Welcome to JavaRanch.

You probably noticed when you signed up that the JavaRanch Naming Policy requires a first name and a last name, which you have. Could you just edit your display name to change the underscore to a space. We require the first name and last name to be separated by spaces. Just a technicality

Thanks,
Jeanne
Forum Bartender
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic