"GeorgeNotFound" 的 MinecraftShocker 插件,如果你有这个错误:jSSC-2.8_x86_64.dll+0xb5db,如何修复



当前我正在尝试复制"GeorgeNotFound"s MinecraftShocker插件从他的视频(https://youtu.be/rCyJ-TFFxWA)但我得到了这个错误,这意味着没有找到Arduino,对吗

我已经检查了Arduino Uno是否连接到";COM3";我已经在Arduino上安装了Firmata

我正在使用Maven添加库

我将我使用的jar从slf4j-log4j12.jar更改为slf4j-jdk14.jar,现在我得到了一个不同的错误

添加了文本以指示其不断失败的位置

为了更好的可读性,将所有早期的编辑都改为斜体

我不再使用CCD_ 1,相反,我删除了com.github.kurbatov:firmata4j:2.3.8org.scream3r:jssc:2.8.0的依赖项,并单独调用了io.github.java-native:jssc:2.9.2(因此它现在不再使用2.8.0作为默认版本,而是使用固定的2.9.2版本;(瞧,正在工作

错误:

Connecting...
Connected
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000007110b5db, pid=9764, tid=1144
#
# JRE version: OpenJDK Runtime Environment (15.0+36) (build 15+36-1562)
# Java VM: OpenJDK 64-Bit Server VM (15+36-1562, mixed mode, sharing, tiered, compressed oops, 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:
# C:UsersLucky 56IdeaProjectsShockerhs_err_pid9764.log
#
# 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.
#
Process finished with exit code 1

代码:

package me.lucky56.shocker;
import org.firmata4j.IODevice;
import org.firmata4j.Pin;
import org.firmata4j.firmata.FirmataDevice;
import java.io.IOException;
public class Main
{
public static void main(String[] args) throws IOException, InterruptedException {
System.out.println("Connecting...");
IODevice device = new FirmataDevice("COM3");
System.out.println("Connected");
device.start();
device.ensureInitializationIsDone();
System.out.println("Connected Successfully");
for (int i = 0; i < 5; i++)
{
turnOn(device);
System.out.println("On");
Thread.sleep(250);
System.out.println("Off");
turnOff(device);
Thread.sleep(1000);
}
device.stop();
}
static void turnOn(IODevice device)
{
try
{
device.getPin(7).setMode(Pin.Mode.OUTPUT);
device.getPin(7).setValue(350);
device.getPin(13).setMode(Pin.Mode.INPUT);
} catch (IOException e)
{
e.printStackTrace();
}
}
static void turnOff(IODevice device)
{
try
{
device.getPin(7).setMode(Pin.Mode.INPUT);
} catch (IOException e)
{
e.printStackTrace();
}
}
}

我不再使用slf4j-jdk14.jar,相反,我删除了com.github.kurbatov:firmata4j:2.3.8org.scream3r:jssc:2.8.0的依赖项,并单独调用了io.github.java-native:jssc:2.9.2(因此它现在不再使用2.8.0作为默认版本,而是使用固定的2.9.2版本;(瞧,正在工作

相关内容

最新更新