Jump to content

[Solved] 1.18.1 won't runClient; "unable to load... FMLClientLaunchHandler"


IceMetalPunk

Recommended Posts

It's been a long time since I've made a mod, and I'm trying to set up one for 1.18.1 using Eclipse. (Specifically, it's Forge MDK 39.0.66.) Whenever I run the runClient configuration, even with just the basic example mod code with no code changes, I get this error:

Quote

ForgeException in thread "main" java.util.ServiceConfigurationError: cpw.mods.modlauncher.api.ILaunchHandlerService: Unable to load net.minecraftforge.fml.loading.targets.FMLClientLaunchHandler

I've made sure I have JDK 17 installed, my JAVA_HOME environment variable points to it, I've done gradlew clean and refreshed dependencies, re-ran genEclipseRuns, and even re-added the system JRE library to the project build path. Nothing seems to stop this error.

What am I doing wrong and how do I fix it?

Edited by IceMetalPunk
Solved

Whatever Minecraft needs, it is most likely not yet another tool tier.

Link to comment
Share on other sites

13 hours ago, diesieben07 said:

Post the full log.

Sure:

 

Quote

2022-02-08 17:25:50,588 main WARN Advanced terminal features are not available in this environment
[32m[17:25:50] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeclientuserdev, --version, MOD_DEV, --assetIndex, 1.18, --assetsDir, C:\Users\iceme\.gradle\caches\forge_gradle\assets, --gameDir, ., --fml.forgeVersion, 39.0.66, --fml.mcVersion, 1.18.1, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20211210.034407]
[mForge[32m[17:25:50] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 9.1.0+9.1.0+main.6690ee51 starting: java version 16.0.2 by Oracle Corporation
[mForgeException in thread "main" java.util.ServiceConfigurationError: cpw.mods.modlauncher.api.ILaunchHandlerService: Unable to load net.minecraftforge.fml.loading.targets.FMLClientLaunchHandler
    at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:582)
    at java.base/java.util.ServiceLoader.loadProvider(ServiceLoader.java:854)
    at java.base/java.util.ServiceLoader$LayerLookupIterator.hasNext(ServiceLoader.java:951)
    at java.base/java.util.ServiceLoader$ProviderSpliterator.tryAdvance(ServiceLoader.java:1481)
    at java.base/java.util.Spliterator.forEachRemaining(Spliterator.java:326)
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
    at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
    at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.<init>(LaunchServiceHandler.java:40)
    at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.<init>(Launcher.java:53)
    at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.main(Launcher.java:77)
    at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26)
    at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23)
    at [email protected]/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149)
Caused by: java.lang.UnsupportedClassVersionError: net/minecraftforge/fml/loading/targets/FMLClientLaunchHandler has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 60.0
    at java.base/java.lang.ClassLoader.defineClass1(Native Method)
    at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1010)
    at [email protected]/cpw.mods.cl.ModuleClassLoader.readerToClass(ModuleClassLoader.java:116)
    at [email protected]/cpw.mods.cl.ModuleClassLoader.lambda$findClass$16(ModuleClassLoader.java:213)
    at [email protected]/cpw.mods.cl.ModuleClassLoader.loadFromModule(ModuleClassLoader.java:223)
    at [email protected]/cpw.mods.cl.ModuleClassLoader.findClass(ModuleClassLoader.java:213)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:631)
    at java.base/java.lang.Class.forName(Class.java:543)
    at java.base/java.util.ServiceLoader.loadProvider(ServiceLoader.java:852)
    ... 14 more

 

Whatever Minecraft needs, it is most likely not yet another tool tier.

Link to comment
Share on other sites

2 minutes ago, Luis_ST said:

the game starts with java 16

🤦‍♂️ So... yeah. Apparently, even though I added System JRE (and deleted and re-added it multiple times) to my project build path, and even though my JAVA_HOME is pointing to the JDK 17.... Eclipse still treated "System JRE" as "the JRE that was bundled deep in the directory structure of this installation of Eclipse" instead of, you know, my actual system's JRE 😑

Thank you for pointing me in the right direction!

Whatever Minecraft needs, it is most likely not yet another tool tier.

Link to comment
Share on other sites

  • IceMetalPunk changed the title to [Solved] 1.18.1 won't runClient; "unable to load... FMLClientLaunchHandler"

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.