2011-11-02 | #1 (permalink) |
初级会员
注册日期: 2011-11-02
帖子: 2
|
linux下测试短信猫遇到问题,求助。。
linux下jdk
jdk/jre/lib javax.comm.properties 内容:Driver=gun.io.RXTXCommDriver jdk/jre/lib/i386 下放linuxSerrial.so RXTXcomm.jar我放在了classpath 还有commons-net-1.4.1.jar jindisms-3.1-RC1.jar log4j-1.2.15.jar comm.jar 例子程序SendMessage.java 这句 SerialModemGateway gateway = new SerialModemGateway("jindi", "/dev/ttyS0", 115200, "wavecom", "M1306B", srv.getLogger()); 执行的时候报错: Caught java.lang.ClassCastException: gnu.io.RXTXCommDriver cannot be cast to javax.comm.CommDriver while loading driver gnu.io.RXTXCommDriver cn.sendsms.GatewayException: The selected comm port does not exist. at cn.sendsms.SerialModemDriver.connectPort(SerialModemDriver.java:59) at cn.sendsms.ModemDriver.connect(ModemDriver.java:83) at cn.sendsms.ModemGateway.startGateway(ModemGateway.java:76) at cn.sendsms.Service.startService(Service.java:114) at com.jindi.SendMessage.doIt(SendMessage.java:33) at com.jindi.SendMessage.main(SendMessage.java:82) |