McModLauncher/modlauncher

Incompatibility between modlauncher 8.1.x (mc 1.16) and Java 8 u321+

gigaherz opened this issue ยท 7 comments

The latest update to Java 8 applied a change to the sun.security.util.ManifestEntryVerifier class constructor, adding a parameter to it.

This breaks binary compatibility with modlauncher 8.1.x code:

ManifestEntryVerifier mev = new ManifestEntryVerifier(manifest);

This change appears to also have been made to the other LTS branches (jdk11 and jdk17) as of last october:

JDK 16 is not affected, and being EOL, will never be.

Stack trace (trimmed):

Exception in thread "main" [15:56:10] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]: java.lang.NoSuchMethodError: sun.security.util.ManifestEntryVerifier.<init>(Ljava/util/jar/Manifest;)V
[15:56:10] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.SecureJarHandler.createCodeSource(SecureJarHandler.java:66)
[15:56:10] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.TransformingClassLoader$DelegatedClassLoader.findClass(TransformingClassLoader.java:275)
[15:56:10] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:136)
[15:56:10] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:98)
[15:56:10] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:-1]:         at java.lang.ClassLoader.loadClass(Unknown Source)

what is the right version of java to downgrade to? Coming late to the Minecraft party, and I don't know what version of java to down, and for the life of me I can't find a version list from Oracle.

This is not a support forum; you should use the forge discord for further questions. However, anything below 8u321 should work fine. Or use the bundled JRE that came with the launcher.

Anything older than Java 8 u321, which would be Java 8 u312 or u311.
Since Oracle's java archive requires an account, you can find it from the Adoptium project; https://adoptium.net/?variant=openjdk8&jvmVariant=hotspot

Fixed by e749b19 (#92).

Excuse me, which version of Forge started to fix this problem?

Excuse me, which version of Forge started to fix this problem?

This was fixed in Forge 36.2.26.

Excuse me, which version of Forge started to fix this problem?

This was fixed in Forge 36.2.26.

Thx.