簡體   English   中英

處理:運行getPortIdentifiers()時出現UnsatisfiedLinkError;

[英]Processing: UnsatisfiedLinkError when running getPortIdentifiers();

我正在修改此草圖 ,以用於基於串行的熱敏打印機。

在聲明對象時,將運行連接函數,特別是

Enumeration<?> portEnum = CommPortIdentifier.getPortIdentifiers();

正在生成此錯誤:

java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver

這是connect函數的開始:

 private void connect() {


                    CommPortIdentifier portId = null;


        Enumeration<?> portEnum = CommPortIdentifier.getPortIdentifiers();

        // iterate through, looking for the port
        while (portEnum.hasMoreElements()) {
          CommPortIdentifier currPortId = (CommPortIdentifier) portEnum.nextElement();
          for (String portName : PORT_NAMES) {
            if (currPortId.getName().equals(portName)) {
              portId = currPortId;
              break;
            }
          }
        }


        if (portId == null) {
          System.out.println("Could not find COM port.");
          return;
        }

有誰知道如何解決這一問題? 我研究了錯誤消息,並且出現的唯一結果暗示一個32位問題,在許多版本的Processing之前似乎都已解決了該問題。 人們建議的其他解決方案特定於Windows和Linux平台。

我在運行64位處理的Mac上。

非常感謝你!

排序。 串行處理庫隨libjSSC-2.6.jnilib而這個較舊的庫正在尋找librxtxSerial.jnilib ,我在這里找到了它

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM