Skip to content

Instantly share code, notes, and snippets.

@ThePixelbrain
Created May 15, 2023 20:53
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ThePixelbrain/a0fe3231b9a9d71d910e7f71895e0196 to your computer and use it in GitHub Desktop.
Save ThePixelbrain/a0fe3231b9a9d71d910e7f71895e0196 to your computer and use it in GitHub Desktop.
[FTB Ultimate] Fix crash with recent Java 8 versions

The original FTB Ultimate for MC 1.4.7 crashes during startup with new versions of Java. This applies to any 1.4.7 modpack including Forestry or Railcraft. A crash might look like the following:

[SEVERE] [Railcraft] The mod Railcraft is expecting signature a0c255ac501b2749537d5824bb0f0588bf0320fa for source railcraft.jar, however there is no signature matching that description
[SEVERE] [Railcraft] Tampering Detected. Please re-download Railcraft.

Solution:

  1. Download this file, name it java.security and save it in the instances base folder (the .minecraft folder)
  2. Add the following Java argument to your game: -Djava.security.properties=java.security

Done. That's it.

What happens behind the scenes:

Java recently disabled the hashing algorithm SHA-1 for JAR signing in new releases of Java 8. You can read up about this change here.

Forge used SHA-1 to verify the integrity of mods back in the day. With the recent change, jars signed with SHA-1 are treated as if they were unsigned. Certain mods like Railcraft or Forestry check for their valid signature and outright terminate the VM if they don't get it.

You can re-enable the signing with SHA-1 as outlined in this post.

Users can, at their own risk, remove these restrictions by modifying the java.security configuration file (or override it by using the java.security.properties system property) and removing "SHA1 usage SignedJAR & denyAfter 2019-01-01" from the jdk.certpath.disabledAlgorithms security property and "SHA1 denyAfter 2019-01-01" from the jdk.jar.disabledAlgorithms security property.

Which is exactly what I did. I provided a java.security file that overrides both properties and used the JVM argument to link it to the instance on startup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment