我尝试使用(Windows XP) javax.comm 库连接到SerialPort COM6并使用这段代码
portId = CommPortIdentifier.getPortIdentifier(commName);
port = portId.open("", Integer.parseInt(timeout));
serialPort = (SerialPort) port;
serialPort.setSerialPortParams(Integer.parseInt(baudRate), SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
但是我遇到了异常 NoSuchPortException 和错误
Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path
Caught java.lang.UnsatisfiedLinkError: com.sun.comm.SolarisDriver.readRegistrySerial(Ljava/util/Vector;Ljava/lang/String;)I while loading driver com.sun.comm.SolarisDriver
Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path
这有什么问题?有人可以帮忙吗?