[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rxtx
Subject:    [Rxtx] Simple Javacode : Error RXTXCommDriver
From:       Indtiny s <indtiny () gmail ! com>
Date:       2011-11-04 4:30:17
Message-ID: CAA8-Wo0_ZguchOGXCSgBhAg+NLucQQJA3OmVX=kyHrs_LZn_Pg () mail ! gmail ! com
[Download RAW message or body]

Hi,

I have downloaded and placed  the following files

 RXTXComm.jar -> /usr/lib/jvm/java-6-openjdk/jre/ext/RXTXcommjar
librxtxSerial.so -> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/librxtxSerial.so .

But I'm  able to compile the simple code but I cant run, when I run
the code I get the following error

 javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver

though  I have placed this  javax.comm.properties to the jre/ext/


..

Here with I have attached my code  . pls help

["SimpleWrite.java" (text/x-java)]

/* program*/

import javax.comm.*;
import java.util.Enumeration;

public class SimpleWrite {
public static void main(String args[]) {
Enumeration ports = CommPortIdentifier.getPortIdentifiers();
while (ports.hasMoreElements()) {
CommPortIdentifier port = (CommPortIdentifier)ports.nextElement();
String type;
switch (port.getPortType()) {
case CommPortIdentifier.PORT_PARALLEL:
type = "Parallel"; 
break;
case CommPortIdentifier.PORT_SERIAL:
type = "Serial"; 
break;
default: /// Shouldn't happen
type = "Unknown"; 
break;
}
System.out.println(port.getName() + ": " + type);
}
}
}


_______________________________________________
Rxtx mailing list
Rxtx@qbang.org
http://mailman.qbang.org/mailman/listinfo/rxtx


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic