HMCL-dev / HMCL

A Minecraft Launcher which is multi-functional, cross-platform and popular
https://hmcl.huangyuhui.net
GNU General Public License v3.0
7.03k stars 684 forks source link

改变.minecraft目录后无法用启动脚本启动1.12.2的forge版 #676

Closed KrisBigK closed 4 years ago

KrisBigK commented 4 years ago

.minecraft\logs\latest.log: [11:35:02] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [11:35:02] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [11:35:02] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker [11:35:02] [main/INFO] [FML]: Forge Mod Loader version 14.23.5.2768 for Minecraft 1.12.2 loading [11:35:02] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_241, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre1.8.0_241 [11:35:02] [main/INFO] [FML]: Searching G:\Program Files (x86)\Scratch\Help\en\images\edited\Minecraft\vanilla.minecraft\mods for mods [11:35:02] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [11:35:02] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [11:35:02] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [11:35:02] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [11:35:02] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [11:35:04] [main/INFO] [FML]: Found valid fingerprint for Minecraft Forge. Certificate fingerprint e3c3d50c7c986df74c645c0ac54639741c90a557 [11:35:04] [main/INFO] [FML]: Found valid fingerprint for Minecraft. Certificate fingerprint cd99959656f753dc28d863b46769f7f8fbaefcfc [11:35:04] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [11:35:04] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [11:35:05] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker [11:35:05] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker [11:35:05] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} [11:35:05] [main/INFO] [net.minecraft.client.Minecraft]: Setting user: KrisBigK [11:35:07] [main/ERROR] [LaunchWrapper]: Unable to launch java.lang.reflect.InvocationTargetException: null 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.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] Caused by: java.lang.NoClassDefFoundError: it/unimi/dsi/fastutil/ints/IntList at net.minecraft.potion.PotionHelper.func_193354_a(PotionHelper.java:217) ~[akh.class:?] at net.minecraft.potion.PotionHelper.func_185207_a(PotionHelper.java:154) ~[akh.class:?] at net.minecraft.init.Bootstrap.func_151354_b(Bootstrap.java:504) ~[ni.class:?] at net.minecraft.client.Minecraft.(Minecraft.java:364) ~[bib.class:?] at net.minecraft.client.main.Main.main(SourceFile:123) ~[Main.class:?] ... 6 more Caused by: java.lang.ClassNotFoundException: it.unimi.dsi.fastutil.ints.IntList at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) ~[launchwrapper-1.12.jar:?] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_241] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_241] at net.minecraft.potion.PotionHelper.func_193354_a(PotionHelper.java:217) ~[akh.class:?] at net.minecraft.potion.PotionHelper.func_185207_a(PotionHelper.java:154) ~[akh.class:?] at net.minecraft.init.Bootstrap.func_151354_b(Bootstrap.java:504) ~[ni.class:?] at net.minecraft.client.Minecraft.(Minecraft.java:364) ~[bib.class:?] at net.minecraft.client.main.Main.main(SourceFile:123) ~[Main.class:?] ... 6 more Caused by: java.lang.NullPointerException at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182) ~[launchwrapper-1.12.jar:?] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_241] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_241] at net.minecraft.potion.PotionHelper.func_193354_a(PotionHelper.java:217) ~[akh.class:?] at net.minecraft.potion.PotionHelper.func_185207_a(PotionHelper.java:154) ~[akh.class:?] at net.minecraft.init.Bootstrap.func_151354_b(Bootstrap.java:504) ~[ni.class:?] at net.minecraft.client.Minecraft.(Minecraft.java:364) ~[bib.class:?] at net.minecraft.client.main.Main.main(SourceFile:123) ~[Main.class:?] ... 6 more

[11:35:07] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: at net.minecraftforge.fml.relauncher.FMLSecurityManager.checkPermission(FMLSecurityManager.java:49) [11:35:07] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: at java.lang.SecurityManager.checkExit(Unknown Source) [11:35:07] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: at java.lang.Runtime.exit(Unknown Source) [11:35:07] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: at java.lang.System.exit(Unknown Source) [11:35:07] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: at net.minecraft.launchwrapper.Launch.launch(Launch.java:138) [11:35:07] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

2.于是我把原来的文件复制到了新硬盘的另外一个目录里,同样重新生成启动脚本,仍无法启动。

3.这之后我把2中所提目录的.minecraft文件夹中内容全部删掉,重新安装1.12.2和forge,仍无法启动。

Edit:在原目录中是可以正常启动的

huanghongxun commented 4 years ago

启动脚本和启动器本身调用的启动命令应该是一致的。启动脚本本身和游戏目录有关,不可以移动游戏目录。 此外查看你的错误报告:java.lang.ClassNotFoundException: it.unimi.dsi.fastutil.ints.IntList,应该是你复制到其他磁盘上文件损坏了

KrisBigK commented 4 years ago

启动脚本和启动器本身调用的启动命令应该是一致的。启动脚本本身和游戏目录有关,不可以移动游戏目录。

我移动了游戏目录以后在新目录下打开启动器,重新生成启动脚本,而且生成的启动脚本里的确是新目录,仍然无法正常启动

此外查看你的错误报告:java.lang.ClassNotFoundException: it.unimi.dsi.fastutil.ints.IntList,应该是你复制到其他磁盘上文件损坏了

我在新目录下删掉整个.minecraft文件夹,重新用启动器安装整个游戏,仍然无法启动。刚才又试了一遍,仍然有同样的问题。 image

huanghongxun commented 4 years ago

请提供你的启动脚本的内容

KrisBigK commented 4 years ago

forge.bat.txt 这个是最后一次试的,为上传文件我在文件名后面加了.txt后缀,删掉即可

huanghongxun commented 4 years ago

请检查 G:\\Program Files (x86)\\Scratch\\Help\\en\\images\\edited\\Minecraft\\test1\\.minecraft\\libraries\\org\\apache\\logging\\log4j\\log4j-api\\2.8.1\\log4j-api-2.8.1.jar G:\\Program Files (x86)\\Scratch\\Help\\en\\images\\edited\\Minecraft\\test1\\.minecraft\\libraries\\org\\apache\\logging\\log4j\\log4j-core\\2.8.1\\log4j-core-2.8.1.jar 这两个文件是否能解压

KrisBigK commented 4 years ago

image

image

能解压

KrisBigK commented 4 years ago

更新:使用HMCL-3.2.150仍无法启动 forge_HMCL-3.2.150.bat.txt image

KrisBigK commented 4 years ago

更新:使用HMCL-3.2.151可以启动了 forge_HMCL-3.2.151.bat.txt latest.log

huanghongxun commented 4 years ago

? 那是神奇哦,这方面我可啥都没改

KrisBigK commented 4 years ago

? 那是神奇哦,这方面我可啥都没改

在https://www.diffchecker.com/ 中我发现了唯一的值得注意的不同之处: image 应该是您的这个commit引起的。 希望这对您有所帮助。