BlueMap

BlueMap

85.1k Downloads

Minecraft <= 1.16.5 require Java 8, but (current) BlueMap releases are built with Java 11

unilock opened this issue ยท 3 comments

commented

Steps to reproduce

  1. Create a Minecraft 1.16.5 server and install Minecraft Forge.
  2. Download and add BlueMap version e.g. BlueMap-3.9-forge-1.16.2.jar to the mods folder.
  3. Start the server.
  4. The server crashes; see report below.

Expected result

The server + BlueMap start without issue.

Actual result

---- Minecraft Crash Report ----
// I blame Dinnerbone.

Time: 1/5/23 2:30 PM
Description: Mod loading error has occurred

...

-- MOD bluemap --
Details:
	Mod File: BlueMap-3.9-forge-1.16.2.jar
	Failure message: BlueMap has class loading errors
		java.lang.UnsupportedClassVersionError: de/bluecolored/bluemap/forge/ForgeMod has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
	Mod Version: 3.9
	Mod Issue URL: https://github.com/BlueMap-Minecraft/BlueMap/issues
	Exception message: java.lang.UnsupportedClassVersionError: de/bluecolored/bluemap/forge/ForgeMod has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
Stacktrace:
	at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_352] {}
	at java.lang.ClassLoader.defineClass(ClassLoader.java:756) ~[?:1.8.0_352] {}
	at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:138) ~[modlauncher-8.1.3.jar:?] {re:classloading}
	at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:98) ~[modlauncher-8.1.3.jar:?] {re:classloading}
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_352] {}
	at java.lang.Class.forName0(Native Method) ~[?:1.8.0_352] {}
	at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_352] {}
	at net.minecraftforge.fml.javafmlmod.FMLModContainer.<init>(FMLModContainer.java:47) ~[forge:36.2] {re:classloading}
	at sun.reflect.GeneratedConstructorAccessor37.newInstance(Unknown Source) ~[?:?] {}
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_352] {}
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_352] {}
	at net.minecraftforge.fml.javafmlmod.FMLJavaModLanguageProvider$FMLModTarget.loadMod(FMLJavaModLanguageProvider.java:62) ~[forge:36.2] {re:classloading}
	at net.minecraftforge.fml.ModLoader.buildModContainerFromTOML(ModLoader.java:288) ~[forge:?] {re:classloading}
	at net.minecraftforge.fml.ModLoader.lambda$buildMods$29(ModLoader.java:267) ~[forge:?] {re:classloading}
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_352] {}
	at java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1723) ~[?:1.8.0_352] {}
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:1.8.0_352] {}
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[?:1.8.0_352] {}
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0_352] {}
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_352] {}
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566) ~[?:1.8.0_352] {}
	at net.minecraftforge.fml.ModLoader.buildMods(ModLoader.java:269) ~[forge:?] {re:classloading}
	at net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$11(ModLoader.java:169) ~[forge:?] {re:classloading}
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_352] {}
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_352] {}
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384) ~[?:1.8.0_352] {}
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:1.8.0_352] {}
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[?:1.8.0_352] {}
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0_352] {}
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_352] {}
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566) ~[?:1.8.0_352] {}
	at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:171) ~[forge:?] {re:classloading}
	at net.minecraftforge.fml.server.ServerModLoader.load(ServerModLoader.java:30) ~[forge:?] {re:classloading}
	at net.minecraft.server.Main.main(Main.java:95) ~[?:?] {re:classloading,re:mixin,pl:mixin:A}
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_352] {}
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_352] {}
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_352] {}
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_352] {}
	at net.minecraftforge.fml.loading.FMLServerLaunchProvider.lambda$launchService$0(FMLServerLaunchProvider.java:37) ~[forge-1.16.5-36.2.39.jar:36.2] {}
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.1.3.jar:?] {re:classloading}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.1.3.jar:?] {re:classloading}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.1.3.jar:?] {re:classloading}
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.1.3.jar:?] {re:classloading}
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.1.3.jar:?] {re:classloading}
	at net.minecraftforge.server.ServerMain$Runner.runLauncher(ServerMain.java:49) [forge-1.16.5-36.2.39.jar:?] {re:classloading}
	at net.minecraftforge.server.ServerMain$Runner.access$100(ServerMain.java:46) [forge-1.16.5-36.2.39.jar:?] {re:classloading}
	at net.minecraftforge.server.ServerMain.main(ServerMain.java:43) [forge-1.16.5-36.2.39.jar:?] {re:classloading}

Context

Minecraft version: 1.16.5
Forge version: 36.2.39
BlueMap Version: 3.9-forge-1.16.2
Java version: jdk8u352-b08

I only tested BlueMap-3.9-forge-1.16.2.jar and BlueMap-3.9-forge-1.14.4.jar, but for the sake of cutting corners I'm assuming all BlueMap releases are built using Java 11, thus making them incompatible with any Minecraft version below (and including) 1.16.5.

commented

Minecraft <= 1.16.5 runs fine with Java 11 .. it doesn't require Java 8 :)
BlueMap requires java 11 ^^

In my opinion, if you somehow have a mod that requires Java 8 and does not run with Java 11, then that mod is the issue, not BlueMap :D

BlueMap will not downgrade to Java 8 :)

Edit: to clarify: it's not just choosing a different compiler, bluemap uses features from Java 11, it's not easily possible to downgrade :)

commented

Okay ... i'll admit being not 100% correct here..

I've tested forge 1.14 and 1.15 with Java 11 and they indeed seem to not work.
Forge 1.16.5 is the first version that seems to work with Java 11.

Fabric and Spigot work fine on all supported versions, so this is an issue with forge versions pre 1.16.5 ..

Will this issue be solved?
No. Supporting older minecraft versions wich each newest bluemap version is more a nice-to-have. BlueMap's core does use some nice Java 11 features and i don't think this is a reason to downgrade back to Java 8.

If one wants to use BlueMap on old forge servers that don't support Java 11, then you can use BlueMap 1.7.3, which is the latest version that still compiles on Java 8 :)

At some point BlueMap might even upgrade it's required Java version further, to benefit of the newer Java-features.
Can't support old versions forever ^^

So the resolving goal of this issue will be removing the unsupported/invalid forge-implementations for the next version, as they are no longer working. => BlueMap from there on only supports Forge 1.16.5 +

commented

Ohh, gotcha. I agree, BlueMap shouldn't be downgraded to Java 8; there's not much benefit in doing that.
Thanks for the clarification :)

If one wants to use BlueMap on old forge servers that don't support Java 11, then you can use BlueMap 1.7.3, which is the latest version that still compiles on Java 8 :)

Maybe this heads-up could be put in the installation guide? (under "General Prerequisites", I would imagine)