librxtxSerial.so 长双限制

librxtxSerial.so long double restrict

我正在尝试在 Ubuntu 14.04 (x64) 上使用 rxtx 库 (https://github.com/rxtx/rxtx) 从串口读取数据。我在 java 1.6 上使用 运行 构建了简单的 java 小程序(尝试使用 1.8 得到相同的结果)。

并且当侦听器想要读取输入时它崩溃并出现以下错误。

Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7
RXTX Warning:  Removing stale lock file. /var/lock/LCK..ttyUSB0
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f90ac2e2462, pid=6721, tid=140259339552512
#
# JRE version: 6.0_45-b06
# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.45-b01 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [librxtxSerial.so+0x6462]  long double restrict+0x52
#
# An error report file with more information is saved as:
# /home/etxzay/IdeaProjects/Solenoid/hs_err_pid6721.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Experimental:  JNI_OnLoad called.

Process finished with exit code 134

看起来这是一种原生 RXTX 库 (librxtxSerial.so) 问题。非常感谢任何帮助。

答案是...使用 JSSC (https://github.com/scream3r/java-simple-serial-connector)。有效。