This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes Parallel and Serial Comm Using Java Comm API on Linux OS System Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Parallel and Serial Comm Using Java Comm API on Linux OS System" Watch "Parallel and Serial Comm Using Java Comm API on Linux OS System" New topic
Author

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

vijay _kumar
Greenhorn

Joined: Dec 03, 2004
Posts: 1
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

Joined: Jul 12, 2004
Posts: 995
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]


blog - InfoQ.com
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
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...


Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30068
    
149

"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


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Parallel and Serial Comm Using Java Comm API on Linux OS System
 
Similar Threads
Rendering Problem while communicating on Serial Port
read voltage with comm?
Java Comm API and Modem Telephone Communication
Serial Port Ethernet
Wanting Some Reference Material about The Serial And Parallel Programming..