在运行自己尝试制作的MOD时游戏无法启动 出现java.lang.NoClassDefFoundError: java.lang.ClassNotFoundException错误

sakai


如果问题解决的话,请记得选择一个楼层作为回答
如果你要链接图片,请确保图片在右侧的渲染窗口可以显示出来,如何发图片,请看置顶的帖子。
左侧语法格式默认为markdown格式
(以上均为基础提示信息,请连此行一起删去)
版本信息
你使用的系统:<win10 64位>
你是用的JDK: <1.8_64>
你使用的IDE:
你使用的IDE版本:<2020.1.1>
Forge版本: <image >
Minecraft版本: <1.12.2>

出错图
<

>
错误情况简述
示例显示MOD能够运行,当自己尝试编写时,在加载页面中断并MINECRAFT关闭

报错日志

[19:06:19] [Client thread/TRACE] [FML]: Mod forge is using network checker : No network checking performed
[19:06:19] [Client thread/TRACE] [FML]: Testing mod forge to verify it accepts its own version in a remote connection
[19:06:19] [Client thread/TRACE] [FML]: The mod forge accepts its own version (14.23.5.2854)
[19:06:19] [Client thread/DEBUG] [FML]: Attempting to inject @Config classes into forge for type INSTANCE
[19:06:19] [Client thread/TRACE] [FML]: Sent event FMLConstructionEvent to mod forge
[19:06:19] [Client thread/DEBUG] [FML]: Bar Step: Construction - Minecraft Forge took 0.121s
[19:06:19] [Client thread/TRACE] [FML]: Sending event FMLConstructionEvent to mod mt
[19:06:19] [Client thread/TRACE] [FML]: Mod mt is using network checker : Accepting version 1.0
[19:06:19] [Client thread/TRACE] [FML]: Testing mod mt to verify it accepts its own version in a remote connection
[19:06:19] [Client thread/TRACE] [FML]: The mod mt accepts its own version (1.0)
[19:06:19] [Client thread/DEBUG] [FML]: Attempting to inject @SidedProxy classes into mt
[19:06:19] [Client thread/ERROR] [FML]: An error occurred trying to load a proxy into com.root.modone.Main.proxy
java.lang.ClassNotFoundException: com.root.modone.proxy.Clientproxy
	at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) ~[launchwrapper-1.12.jar:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[?:1.8.0_251]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_251]
	at net.minecraftforge.fml.common.ModClassLoader.loadClass(ModClassLoader.java:75) ~[ModClassLoader.class:?]
	at java.lang.Class.forName0(Native Method) ~[?:1.8.0_251]
	at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_251]
	at net.minecraftforge.fml.common.ProxyInjector.inject(ProxyInjector.java:85) [ProxyInjector.class:?]
	at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:613) [FMLModContainer.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_251]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_251]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_251]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_251]
	at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) [guava-21.0.jar:?]
	at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) [guava-21.0.jar:?]
	at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) [guava-21.0.jar:?]
	at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) [guava-21.0.jar:?]
	at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) [guava-21.0.jar:?]
	at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) [guava-21.0.jar:?]
	at com.google.common.eventbus.EventBus.post(EventBus.java:217) [guava-21.0.jar:?]
	at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219) [LoadController.class:?]
	at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197) [LoadController.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_251]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_251]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_251]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_251]
	at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) [guava-21.0.jar:?]
	at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) [guava-21.0.jar:?]
	at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) [guava-21.0.jar:?]
	at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) [guava-21.0.jar:?]
	at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) [guava-21.0.jar:?]
	at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) [guava-21.0.jar:?]
	at com.google.common.eventbus.EventBus.post(EventBus.java:217) [guava-21.0.jar:?]
	at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136) [LoadController.class:?]
	at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:595) [Loader.class:?]
	at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:232) [FMLClientHandler.class:?]
	at net.minecraft.client.Minecraft.init(Minecraft.java:467) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.run(Minecraft.java:378) [Minecraft.class:?]
	at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_251]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_251]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_251]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_251]
	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:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_251]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_251]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_251]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_251]
	at net.minecraftforge.legacydev.Main.start(Main.java:86) [legacydev-0.2.3.1-fatjar.jar:0.2.3.1+4+372be23]
	at net.minecraftforge.legacydev.MainClient.main(MainClient.java:29) [legacydev-0.2.3.1-fatjar.jar:0.2.3.1+4+372be23]
Caused by: java.lang.NoClassDefFoundError: com/root/modone/proxy/Clientproxy (wrong name: com/root/modone/proxy/ClientProxy)
	at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_251]
	at java.lang.ClassLoader.defineClass(ClassLoader.java:756) ~[?:1.8.0_251]
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_251]
	at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182) ~[launchwrapper-1.12.jar:?]
	... 49 more
[19:06:19] [Client thread/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:553]: ---- Minecraft Crash Report ----
// Who set us up the TNT?

Time: 6/28/20 7:06 PM
Description: There was a severe problem during mod loading that has caused the game to fail

net.minecraftforge.fml.common.LoaderException: java.lang.ClassNotFoundException: com.root.modone.proxy.Clientproxy
	at net.minecraftforge.fml.common.ProxyInjector.inject(ProxyInjector.java:102)
	at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:613)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
	at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
	at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
	at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
	at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
	at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
	at com.google.common.eventbus.EventBus.post(EventBus.java:217)
	at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219)
	at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
	at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
	at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
	at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
	at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
	at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
	at com.google.common.eventbus.EventBus.post(EventBus.java:217)
	at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136)
	at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:595)
	at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:232)
	at net.minecraft.client.Minecraft.init(Minecraft.java:467)
	at net.minecraft.client.Minecraft.run(Minecraft.java:378)
	at net.minecraft.client.main.Main.main(Main.java:118)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.minecraftforge.legacydev.Main.start(Main.java:86)
	at net.minecraftforge.legacydev.MainClient.main(MainClient.java:29)
Caused by: java.lang.ClassNotFoundException: com.root.modone.proxy.Clientproxy
	at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
	at net.minecraftforge.fml.common.ModClassLoader.loadClass(ModClassLoader.java:75)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:348)
	at net.minecraftforge.fml.common.ProxyInjector.inject(ProxyInjector.java:85)
	... 43 more
Caused by: java.lang.NoClassDefFoundError: com/root/modone/proxy/Clientproxy (wrong name: com/root/modone/proxy/ClientProxy)
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182)
	... 49 more


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

-- System Details --
Details:
	Minecraft Version: 1.12.2
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_251, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 416648008 bytes (397 MB) / 623902720 bytes (595 MB) up to 1875378176 bytes (1788 MB)
	JVM Flags: 0 total; 
	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
	FML: MCP 9.42 Powered by Forge 14.23.5.2854 6 mods loaded, 6 mods active
	States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

	| State | ID                 | Version      | Source                                                             | Signature |
	|:----- |:------------------ |:------------ |:------------------------------------------------------------------ |:--------- |
	| LC    | minecraft          | 1.12.2       | minecraft.jar                                                      | None      |
	| LC    | mcp                | 9.42         | minecraft.jar                                                      | None      |
	| LC    | FML                | 8.0.99.99    | forge-1.12.2-14.23.5.2854_mapped_snapshot_20171003-1.12-recomp.jar | None      |
	| LC    | forge              | 14.23.5.2854 | forge-1.12.2-14.23.5.2854_mapped_snapshot_20171003-1.12-recomp.jar | None      |
	| LE    | mt                 | 1.0          | main                                                               | None      |
	| L     | example/examplemod | 1.0          | main                                                               | None      |

	Loaded coremods (and transformers): 
	GL info: ' Vendor: 'Intel' Version: '4.5.0 - Build 25.20.100.6576' Renderer: 'Intel(R) UHD Graphics 630'
[19:06:19] [Client thread/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:553]: #@!@# Game crashed! Crash report saved to: #@!@# E:\Minecrafta\run\.\crash-reports\crash-2020-06-28_19.06.19-client.txt

FledgeXu


论坛内容默认输入格式是Markdown格式,为了内容整洁的考虑,请花费20分钟的时间稍微学习一下Markdown格式
1.12 Forge 官方已经放弃支持,如果你是初学者请迁移到1.15


请你补充: com.root.modone.proxy.Clientproxy 这个类的代码。
还有请删除代码中的example/examplemod


FledgeXu


请问问题解决了吗?如果解决了,选择一个楼层作为答案,或者自己补充一个楼层作为答案。


Snownee


我觉得这种帖子还是放到冰川之下比较好


FledgeXu


没事,我觉留着没关系。


system


该主题在最后一个回复创建后7天后自动关闭。不再允许新的回复。