java - Arduino IDE 不工作 Linux Mint

标签 java linux arduino

我刚刚在 Linux Mint 上使用 apt-get 命令安装了 Arduino IDE。当我运行程序时,我首先看到这个窗口:

Adruino IDE Window

选择一个文件夹来保存我的草图后,什么也没有发生。

我从命令行运行程序,这样我就可以看到错误是什么,这是它显示的内容:

arduino ide
Java HotSpot(TM) Server VM warning: You have loaded library /usr/lib/jni/librxtxSerial-2.2pre1.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
java.lang.UnsatisfiedLinkError: /usr/lib/jni/librxtxSerial-2.2pre1.so: /usr/lib/jni/librxtxSerial-2.2pre1.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch) thrown while loading gnu.io.RXTXCommDriver
Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/lib/jni/librxtxSerial-2.2pre1.so: /usr/lib/jni/librxtxSerial-2.2pre1.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1938)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1854)
    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)

我尝试在我的机器上重新安装 Java,但没有成功。有人可以帮我理解这个错误吗?

最佳答案

解决了。我猜我使用的 Java 版本有问题。我安装了 OpenJDK 8 并将其设置为我的默认 Java,然后一切正常。

关于java - Arduino IDE 不工作 Linux Mint,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33930373/

相关文章:

java - 我可以在没有 PApplet 的情况下使用 Processing 与 Eclipse 中的 Arduino 进行通信吗?

java - Clover 和 Jacoco 给出不同的代码覆盖率结果

linux - Git pull 和推不起作用(使用 gitg 客户端)

python - 通过 XBee 模块将字符串从 Raspberry Pi 发送到 Arduino

c - 为什么复制目录的 C 程序代码在逻辑上是错误的?

c - 当某个进程打开文件时,unlink() 会做什么?

c# - 由c#程序控制的Arduino设备

java - 将变量传递给 spring getter

java - 这个损坏的 Java Random.nextInt(long) 行为是怎么回事?

java - 当我尝试使用扫描仪时,为什么会收到 java.util.NoSuchElementException