在我的 Raspberry Pi 上,我安装了一个干净的 Raspbian,并在其上安装了 openhab。我想使用 pi 对连接的 arduino 进行编程,所以我安装了 Arduino IDE。但是,当尝试运行它时,我收到此错误:
java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver
Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:123)
at processing.app.Editor.populateSerialMenu(Editor.java:962)
at processing.app.Editor.buildToolsMenu(Editor.java:691)
at processing.app.Editor.buildMenuBar(Editor.java:476)
at processing.app.Editor.<init>(Editor.java:205)
at processing.app.Base.handleOpen(Base.java:705)
at processing.app.Base.handleOpen(Base.java:670)
at processing.app.Base.handleNew(Base.java:566)
at processing.app.Base.<init>(Base.java:306)
at processing.app.Base.main(Base.java:195)
我已经安装了librxtx-java
,但 arduino IDE 仍然无法找到该库。有人遇到过类似的问题吗?
最佳答案
我猜问题是,Arduino 附带了自己的 java 安装。 当您启动 Arduino-IDE 时,您只需调用一个 bash 脚本,该脚本会在内部启动(arduino 附带的)java 来运行 IDE(这样,Arduino-IDE 就可以在根本没有安装 java 的系统上运行) .
现在您已经安装了librxtx-java
在您的树莓派上,您将此库安装到您的 systems-java-library 目录中。 Arduino 附带的 java 对这个库一无所知。
尝试链接(或复制)您的 librxtx.jar
进入你的<arduino_installation>/java/lib
文件夹。
(不幸的是我不能自己尝试,因为我现在没有树莓派;))
关于java - 尝试在 Raspberry Pi 上运行 Arduino IDE 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55109837/