Minecraft的疑難雜癥#2023/6/16-1.16.5版本使用Java17崩潰
這個(gè)崩潰沒什么好說啦~太高版本的Java可能做了些改動(dòng)導(dǎo)致啟動(dòng)失敗。
你需要做的就是將Java版本倒到Java8 ~ Java16都可以。
關(guān)鍵句:java.lang.RuntimeException: java.lang.NoSuchMethodException: no such method: sun.misc.Unsafe.defineAnonymousClass(Class,byte[],Object[])Class/invokeVirtual
java.lang.NoSuchMethodError: 'java.lang.Class sun.misc.Unsafe.defineAnonymousClass(java.lang.Class, byte[], java.lang.Object[])'
...[省略]...
[071月2023 14:30:52.440] [main/INFO] [STDERR/]: [org.antlr.v4.runtime.ConsoleErrorListener:syntaxError:38]: line 1:147 token recognition error at: '>'
[071月2023 14:30:52.440] [main/INFO] [STDERR/]: [org.antlr.v4.runtime.ConsoleErrorListener:syntaxError:38]: line 1:148 token recognition error at: ';'
[071月2023 14:30:52.457] [main/INFO] [STDERR/]: [org.antlr.v4.runtime.ConsoleErrorListener:syntaxError:38]: line 1:0 token recognition error at: '/'
[071月2023 14:30:52.457] [main/INFO] [STDERR/]: [org.antlr.v4.runtime.ConsoleErrorListener:syntaxError:38]: line 1:1 token recognition error at: '/'
[071月2023 14:30:52.491] [main/INFO] [STDERR/]: [org.antlr.v4.runtime.ConsoleErrorListener:syntaxError:38]: line 1:0 token recognition error at: '~'
[071月2023 14:30:53.310] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1077]: java.lang.reflect.InvocationTargetException
[071月2023 14:30:53.311] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1077]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...[省略]...
[071月2023 14:30:53.316] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1086]: at cpw.mods.modlauncher.Launcher.main(Launcher.java:66)
[071月2023 14:30:53.316] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1086]: ... 6 more
[071月2023 14:30:53.316] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:659]: Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodException: no such method: sun.misc.Unsafe.defineAnonymousClass(Class,byte[],Object[])Class/invokeVirtual
[071月2023 14:30:53.316] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:659]: at org.openjdk.nashorn.internal.runtime.Context$AnonymousContextCodeInstaller.lambda$getDefineAnonymousClass$0(Context.java:335)
...[省略]...
[071月2023 14:30:53.318] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:682]: at org.openjdk.nashorn.internal.runtime.Context$AnonymousContextCodeInstaller.lambda$getDefineAnonymousClass$0(Context.java:329)
[071月2023 14:30:53.319] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:682]: ... 30 more
[071月2023 14:30:53.319] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:724]: Caused by: java.lang.NoSuchMethodError: 'java.lang.Class sun.misc.Unsafe.defineAnonymousClass(java.lang.Class, byte[], java.lang.Object[])'
...[省略]...
[071月2023 14:30:53.320] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:724]: at java.base/java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:1114)
[071月2023 14:30:53.320] [main/INFO] [STDERR/]: [java.lang.Throwable:printEnclosedStackTrace:724]: ... 33 more
[為減少篇幅刪減了部分內(nèi)容]
或者是
...[省略]...
[13:29:33] [main/INFO]: [org.antlr.v4.runtime.ConsoleErrorListener:syntaxError:38]: line 1:0 token recognition error at: '~'
[13:29:33] [main/INFO]: OptiFineTransformationService.transformers
[13:29:33] [main/INFO]: Targets: 311
[13:29:35] [main/INFO]: [java.lang.ThreadGroup:uncaughtException:1077]: java.lang.reflect.InvocationTargetException
[13:29:35] [main/INFO]: [java.lang.ThreadGroup:uncaughtException:1077]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...[省略]...
[13:29:35] [main/INFO]: [java.lang.ThreadGroup:uncaughtException:1077]: at oolloo.jlw.Wrapper.main(Wrapper.java:53)
[13:29:35] [main/INFO]: [java.lang.ThreadGroup:uncaughtException:1086]: Caused by: java.lang.ExceptionInInitializerError
[13:29:35] [main/INFO]: [java.lang.ThreadGroup:uncaughtException:1086]: at org.openjdk.nashorn.internal.runtime.Context.compile(Context.java:1509)
...[省略]...
[13:29:35] [main/INFO]: [java.lang.ThreadGroup:uncaughtException:1086]: at cpw.mods.modlauncher.Launcher.main(Launcher.java:66)
[13:29:35] [main/INFO]: [java.lang.ThreadGroup:uncaughtException:1086]: ... 6 more
[13:29:35] [main/INFO]: [java.lang.Throwable:printStackTrace:659]: Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodException: no such method: sun.misc.Unsafe.defineAnonymousClass(Class,byte[],Object[])Class/invokeVirtual
...[省略]...
[13:29:35] [main/INFO]: [java.lang.Throwable:printStackTrace:659]: at org.openjdk.nashorn.internal.runtime.Context$AnonymousContextCodeInstaller.<clinit>(Context.java:317)
[13:29:35] [main/INFO]: [java.lang.Throwable:printStackTrace:659]: ... 27 more
[13:29:35] [main/INFO]: [java.lang.Throwable:printStackTrace:682]: Caused by: java.lang.NoSuchMethodException: no such method: sun.misc.Unsafe.defineAnonymousClass(Class,byte[],Object[])Class/invokeVirtual
[13:29:35] [main/INFO]: [java.lang.Throwable:printStackTrace:682]: at java.base/java.lang.invoke.MemberName.makeAccessException(MemberName.java:976)
...[省略]...
[13:29:35] [main/INFO]: [java.lang.Throwable:printStackTrace:682]: ... 30 more
[13:29:35] [main/INFO]: [java.lang.Throwable:printEnclosedStackTrace:724]: Caused by: java.lang.NoSuchMethodError: 'java.lang.Class sun.misc.Unsafe.defineAnonymousClass(java.lang.Class, byte[], java.lang.Object[])'
[13:29:35] [main/INFO]: [java.lang.Throwable:printEnclosedStackTrace:724]: at java.base/java.lang.invoke.MethodHandleNatives.resolve(Native Method)
[13:29:35] [main/INFO]: [java.lang.Throwable:printEnclosedStackTrace:724]: at java.base/java.lang.invoke.MemberName$Factory.resolve(MemberName.java:1085)
[13:29:35] [main/INFO]: [java.lang.Throwable:printEnclosedStackTrace:724]: at java.base/java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:1114)
[13:29:35] [main/INFO]: [java.lang.Throwable:printEnclosedStackTrace:724]: ... 33 more
Exception in thread "main"?
[為減少篇幅刪減了部分內(nèi)容]

如果幫到你的話幫忙點(diǎn)點(diǎn)贊吧~ 讓更多人有需要的人看到w