Sure, here’s the translation of the provided content: Minecraft Forge在Eclipse中崩溃

huangapple go评论86阅读模式
英文:

Minecraft Forge crash in eclipse

问题

我刚开始在Forge中进行修改,并遇到了一个无法解决的错误。
我已经正确配置了运行/调试配置,.toml文件也没问题,我也将示例模组保留了下来。
我在崩溃报告中看到了这个错误:

    ---- Minecraft 崩溃报告 ----
// 你应该尝试我们的姐妹游戏,Minceraft!

时间:4/6/20 2:06 AM
描述:正在初始化游戏

java.lang.NoSuchMethodError: java.nio.ByteBuffer.rewind()Ljava/nio/ByteBuffer;
	at net.minecraft.client.MainWindow.loadIcon(MainWindow.java:188) ~[forge-1.15.2-31.1.36_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.MainWindow.setWindowIcon(MainWindow.java:152) ~[forge-1.15.2-31.1.36_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.<init>(Minecraft.java:385) ~[forge-1.15.2-31.1.36_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.main.Main.main(Main.java:141) ~[forge-1.15.2-31.1.36_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_241] {}
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241] {}
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241] {}
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_241] {}
	at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.15.2-31.1.36_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.0.0-milestone.4.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.0.0-milestone.4.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.0.0-milestone.4.jar:?] {}
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.0.0-milestone.4.jar:?] {}
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.0.0-milestone.4.jar:?] {}
	at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:102) [forge-1.15.2-31.1.36_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {}


错误的详细步骤、代码路径和所有已知细节如下:
---------------------------------------------------------------------------------------

-- 头部 --
线程:渲染线程
堆栈跟踪:
	at net.minecraft.client.MainWindow.loadIcon(MainWindow.java:188)
	at net.minecraft.client.MainWindow.setWindowIcon(MainWindow.java:152)
	at net.minecraft.client.Minecraft.<init>(Minecraft.java:385)

-- 初始化 --
细节:
堆栈跟踪:
	at net.minecraft.client.main.Main.main(Main.java:141)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55)
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37)
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54)
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72)
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:81)
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:65)
	at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:102)

-- 系统细节 --
细节:
	Minecraft 版本:1.15.2
	操作系统:Windows 10 (amd64) 版本 10.0
	Java 版本:1.8.0_241, Oracle Corporation
	Java VM 版本:Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	内存:1863636320 字节 (1777 MB) / 3145728000 字节 (3000 MB) 直至 7621050368 字节 (7268 MB)
	CPUs:12
	JVM 标志:1 个总计;-XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump
	启动版本:MOD_DEV
	后端库:LWJGL 版本 3.2.2 build 10
	后端 API:GeForce RTX 2080/PCIe/SSE2 GL 版本 4.6.0 NVIDIA 445.75, NVIDIA Corporation
	GL Caps:
	正在使用 VBOs:是
	是否已修改:绝对是;客户端品牌更改为 'forge'
	类型:客户端 (map_client.txt)
	CPU:&lt;unknown&gt;
[m[32m[02:06:26] [Render thread/INFO] [STDOUT/]: [net.minecraft.util.registry.Bootstrap:printToSYSOUT:110]: #@!@# 游戏崩溃!崩溃报告已保存至:#@!@# C:\Users\Julian Burger\Desktop.15.2 Mod\VoidDimension
英文:

I am new to modding in Forge and I came across an error which I can't solve.
I've correctly configured the Run/Debug configs the .toml file is fine and I left the example mod as it was.
I get this error in the crash report:

    ---- Minecraft Crash Report ----
// You should try our sister game, Minceraft!

Time: 4/6/20 2:06 AM
Description: Initializing game

java.lang.NoSuchMethodError: java.nio.ByteBuffer.rewind()Ljava/nio/ByteBuffer;
	at net.minecraft.client.MainWindow.loadIcon(MainWindow.java:188) ~[forge-1.15.2-31.1.36_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.MainWindow.setWindowIcon(MainWindow.java:152) ~[forge-1.15.2-31.1.36_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.&lt;init&gt;(Minecraft.java:385) ~[forge-1.15.2-31.1.36_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.main.Main.main(Main.java:141) ~[forge-1.15.2-31.1.36_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_241] {}
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241] {}
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241] {}
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_241] {}
	at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.15.2-31.1.36_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-5.0.0-milestone.4.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-5.0.0-milestone.4.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-5.0.0-milestone.4.jar:?] {}
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-5.0.0-milestone.4.jar:?] {}
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-5.0.0-milestone.4.jar:?] {}
	at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:102) [forge-1.15.2-31.1.36_mapped_snapshot_20200225-1.15.1-recomp.jar:?] {}


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Render thread
Stacktrace:
	at net.minecraft.client.MainWindow.loadIcon(MainWindow.java:188)
	at net.minecraft.client.MainWindow.setWindowIcon(MainWindow.java:152)
	at net.minecraft.client.Minecraft.&lt;init&gt;(Minecraft.java:385)

-- Initialization --
Details:
Stacktrace:
	at net.minecraft.client.main.Main.main(Main.java:141)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55)
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37)
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54)
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72)
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:81)
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:65)
	at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:102)

-- System Details --
Details:
	Minecraft Version: 1.15.2
	Minecraft Version ID: 1.15.2
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_241, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 1863636320 bytes (1777 MB) / 3145728000 bytes (3000 MB) up to 7621050368 bytes (7268 MB)
	CPUs: 12
	JVM Flags: 1 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump
	Launched Version: MOD_DEV
	Backend library: LWJGL version 3.2.2 build 10
	Backend API: GeForce RTX 2080/PCIe/SSE2 GL version 4.6.0 NVIDIA 445.75, NVIDIA Corporation
	GL Caps: 
	Using VBOs: Yes
	Is Modded: Definitely; Client brand changed to &#39;forge&#39;
	Type: Client (map_client.txt)
	CPU: &lt;unknown&gt;
[m[32m[02:06:26] [Render thread/INFO] [STDOUT/]: [net.minecraft.util.registry.Bootstrap:printToSYSOUT:110]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\Julian Burger\Desktop.15.2 Mod\VoidDimension\run\.\crash-reports\crash-2020-04-06_02.06.26-client.txt
[m

Maybe I am missing some files I don't know.
I followed some tutorials on YouTube but I could get it to work.
I hope someone can help me because I can't help my self

答案1

得分: 1

在您使用的Java 8中,java.nio.ByteBuffer.rewind()方法不存在,因此会出现此错误(它不是通过反射访问的公共方法;非公共方法不属于API,不应该被使用)。

需要特定的Java版本,可能是Java 11或更高版本,以避免这个问题。

可以从AdoptOpenJDK下载Java JDK,并且必须在Window > Preferences: Java > Installed JREs中进行配置,以便在Eclipse中使用。

英文:

In Java 8 that you use, java.nio.ByteBuffer.rewind() does not exist, hence this error (it is not a public method that is therefore accessed via reflection; non-public methods are not API and should not be used at all).

A certain Java version is required, probably Java 11 or higher, to avoid this issue.

A Java JDK can be downloaded e.g. from AdoptOpenJDK and have to be configured in Window > Preferences: Java > Installed JREs to be able to be used in Eclipse.

huangapple
  • 本文由 发表于 2020年4月6日 08:24:58
  • 转载请务必保留本文链接:https://go.coder-hub.com/61051243.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定