Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Can't use runClient: FMLClientLaunchHandler has been compiled by a more recent version of the Java Runtime


Syric
 Share

Recommended Posts

EDIT: Running 'gradlew runClient' directly in the terminal does not produce this issue, but using IntelliJ's normal Run button does.

 

When I try to use runClient or runServer, I get an error like this. Updating from Java 16 to 18 and restarting intelliJ seemed to fix the issue for runClient, but today I tried runServer again and now neither works anymore.

I'm modding on 1.19 with the latest mdk.

[15:22:27] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeclientuserdev, --version, MOD_DEV, --assetIndex, 1.19, --assetsDir, C:\Users\Caspian\.gradle\caches\forge_gradle\assets, --gameDir, ., --fml.forgeVersion, 41.0.17, --fml.mcVersion, 1.19, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220607.102129]
Forge[15:22:27] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 9.1.6+9.1.6+main.14b0cc03 starting: java version 16.0.2 by Oracle Corporation; OS Windows 10 arch amd64 version 10.0
ForgeException 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/cpw.mods.modlauncher@9.1.6/cpw.mods.modlauncher.LaunchServiceHandler.<init>(LaunchServiceHandler.java:40)
	at MC-BOOTSTRAP/cpw.mods.modlauncher@9.1.6/cpw.mods.modlauncher.Launcher.<init>(Launcher.java:53)
	at MC-BOOTSTRAP/cpw.mods.modlauncher@9.1.6/cpw.mods.modlauncher.Launcher.main(Launcher.java:77)
	at MC-BOOTSTRAP/cpw.mods.modlauncher@9.1.6/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26)
	at MC-BOOTSTRAP/cpw.mods.modlauncher@9.1.6/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23)
	at cpw.mods.bootstraplauncher@1.0.0/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 cpw.mods.securejarhandler@1.0.3/cpw.mods.cl.ModuleClassLoader.readerToClass(ModuleClassLoader.java:116)
	at cpw.mods.securejarhandler@1.0.3/cpw.mods.cl.ModuleClassLoader.lambda$findClass$16(ModuleClassLoader.java:216)
	at cpw.mods.securejarhandler@1.0.3/cpw.mods.cl.ModuleClassLoader.loadFromModule(ModuleClassLoader.java:226)
	at cpw.mods.securejarhandler@1.0.3/cpw.mods.cl.ModuleClassLoader.findClass(ModuleClassLoader.java:216)
	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

Process finished with exit code 1

 

Edited by Syric
Link to comment
Share on other sites

I've solved the problem. For anyone else using IntelliJ, I had to go into File > Project Structure > SDKs and add Java 18, then Edit Run Configurations so that my runs used that SDK instead of the old one.

Link to comment
Share on other sites

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
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.

 Share



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I'm trying to make a block that is slippery in one direction: its friction depends on the angle of your motion. I've got it to work perfectly for nonplayer entities, but (once again), the player poses a different issue because of siding. My testing indicates that calling getDeltaMovement is giving (0, -1, 0) on serverside when it shouldn't be, and this screws up the calculation. How can I get accurate information here? @Override public float getFriction(BlockState state, LevelReader level, BlockPos pos, @org.jetbrains.annotations.Nullable Entity entity) { if (entity == null) { return 0.7F; } //Get a unit vector in the appropriate direction Vec3 axisUnitVector = Vec3.ZERO; if (state.getValue(AXIS) == Direction.Axis.X) { axisUnitVector = new Vec3(1, 0, 0); } else if (state.getValue(AXIS) == Direction.Axis.Z) { axisUnitVector = new Vec3(0, 0, 1); } //The block can't be placed vertically //Take the dot product of that vector with a unit vector in the direction of the entity's movement //This effectively just returns the cosine of the angle between the entity's vector and the chosen axis //i.e. 0 when perpendicular, 1 when parallel, etc. Vec3 normalizedMovement = entity.getDeltaMovement().normalize(); double dotProduct = Math.abs(normalizedMovement.dot(axisUnitVector)); //Produce a string for reporting String vectorString = "(" + StringUtils.truncate(String.valueOf(normalizedMovement.x), 4) + "," + StringUtils.truncate(String.valueOf(normalizedMovement.y), 4) + "," + StringUtils.truncate(String.valueOf(normalizedMovement.z), 4) + ")"; //Friction ranges from 0.6 to 1 depending on that cosine double finalMultiplier = Mth.lerp(dotProduct, 0.6, 1); chatPrint("Friction: " + StringUtils.truncate(String.valueOf(finalMultiplier), 5) + ", dot:" + StringUtils.truncate(String.valueOf(dotProduct), 5) + ", vector:" + vectorString + (level.isClientSide() ? "clientside" : "serverside"), (Level) level); return (float) finalMultiplier; } Walking on the block in the slippery direction produces this output: [CHAT] Friction: 0.6, dot:0.0, vector:(0.0,-1.0,0.0) serverside [CHAT] Friction: 0.981, dot:0.953, vector:(-0.0,-0.3,-0.9) clientside [CHAT] Friction: 0.6, dot:0.0, vector:(0.0,-1.0,0.0) serverside [CHAT] Friction: 0.981, dot:0.952, vector:(-0.0,-0.3,-0.9) clientside [CHAT] Friction: 0.6, dot:0.0, vector:(0.0,-1.0,0.0) serverside [CHAT] Friction: 0.981, dot:0.952, vector:(-0.0,-0.3,-0.9) clientside [CHAT] Friction: 0.6, dot:0.0, vector:(0.0,-1.0,0.0) serverside [CHAT] Friction: 0.981, dot:0.952, vector:(-0.0,-0.3,-0.9) clientside [CHAT] Friction: 0.6, dot:0.0, vector:(0.0,-1.0,0.0) serverside [CHAT] Friction: 0.980, dot:0.952, vector:(-0.0,-0.3,-0.9) clientside [CHAT] Friction: 0.6, dot:0.0, vector:(0.0,-1.0,0.0) serverside [CHAT] Friction: 0.980, dot:0.952, vector:(-0.0,-0.3,-0.9) clientside [CHAT] Friction: 0.6, dot:0.0, vector:(0.0,-1.0,0.0) serverside [CHAT] Friction: 0.980, dot:0.952, vector:(-0.0,-0.3,-0.9) clientside  
    • The 1.19 optifine previews are not compatible with forge, see the release notes: https://optifine.net/changelog?f=preview_OptiFine_1.19_HD_U_H8_pre2.jar
    • deleted the folder, and still, not working.
  • Topics

×
×
  • Create New...

Important Information

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