JavaFX and SerialPort



我在JavaFX中编写了一个应用程序,我想打开一个端口连接到Arduino:

SerialPort port = new SerialPort ("PORT");

当我打开端口时:

port.openPort ();

我得到以下问题(当我注释这行代码时,问题消失了):

# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000007110b5db, pid=5544, tid=7360
#
# JRE version: Java(TM) SE Runtime Environment (17.0.1+12) (build 17.0.1+12-LTS-39)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (17.0.1+12-LTS-39, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
# Problematic frame:
# C  [jSSC-2.8_x86_64.dll+0xb5db]
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# D:path
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.

它使用JavaFX17和Java 17。有人能帮帮我吗?

您必须使用正确的端口名称。

COM端口的名称可以在Arduino IDE或设备管理器中查看。

相关内容

  • 没有找到相关文章

最新更新