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.
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.
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...
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