日期:2014-05-20  浏览次数:20772 次

需要大家的帮忙,我的串口通信问题!
以前开发的时候用的是sun公司的comm.jar开发的串口因为它只支持windows
现在改用包RXTXcomm.jar来替换comm.jar包.但我在linux启动服务的时候报这个错,不知道为什么?希望高手多多指教!错误如下:
15:19:21,442   ERROR   [STDERR]   java.lang.UnsatisfiedLinkError:   no   rxtxSerial   in   java.library.path   thrown   while   loading   gnu.io.RXTXCommDriver
15:19:21,444   ERROR   [Engine]   StandardContext[]:   Exception   sending   context   initialized   event   to   listener   instance   of   class   com.roya.scomm.mcc.windows.SerialDataListenerImpl
java.lang.UnsatisfiedLinkError:   no   rxtxSerial   in   java.library.path
                at   java.lang.ClassLoader.loadLibrary(ClassLoader.java:1517)
                at   java.lang.Runtime.loadLibrary0(Runtime.java:788)
                at   java.lang.System.loadLibrary(System.java:834)
                at   gnu.io.CommPortIdentifier. <clinit> (CommPortIdentifier.java:83)
                at   com.roya.scomm.mcc.windows.SerialContext.initialize(SerialContext.java:63)
                at   com.roya.scomm.mcc.windows.SerialContext.listen(SerialContext.java:113)
                at   com.roya.scomm.mcc.windows.SerialDataListenerImpl.contextInitialized(SerialDataListenerImpl.java:44)
                at   org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3269)
                at   org.apache.catalina.core.StandardContext.start(StandardContext.java:3598)
                at   org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
                at   org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
                at   org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
                at   org.jboss.web.catalina.EmbeddedCatalinaService41.createWebContext(EmbeddedCatalinaService41.java:432)
                at   org.jboss.web.catalina.EmbeddedCatalinaService41.performDeploy(EmbeddedCatalinaService41.java:306)
                at   org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:300)
                at   org.jboss.deployment.MainDeployer.start(MainDeployer.java:814)
                at   org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:627)
                at   org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:591)
                at   sun.reflect.NativeMethodAccessorImpl.invoke0(Native   Method)
                at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at   java.lang.reflect.Method.invoke(Method.java:324)