Skip to content

Instantly share code, notes, and snippets.

@ThePixelbrain
Created May 15, 2023 20:53
Show Gist options
  • 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.

@JustDoom
Copy link

Why thank you

@Vapaman
Copy link

Vapaman commented Aug 8, 2024

Thank you so much!

@danilomrx0
Copy link

Hey man, I know it work in Windows, but do you know how to do that in Linux?
I've tried saving the file in the instances folder, but it's not recognizing. Maybe the java arg should be different, idk...

@ThePixelbrain
Copy link
Author

Hey man, I know it work in Windows, but do you know how to do that in Linux? I've tried saving the file in the instances folder, but it's not recognizing. Maybe the java arg should be different, idk...

I have been using this argument fine with PrismLauncher on Windows, Mac and Linux. Maybe your launcher works differently? You could always try to use an absolute path to the file instead, which should work.

@danilomrx0
Copy link

Hey man, I know it work in Windows, but do you know how to do that in Linux? I've tried saving the file in the instances folder, but it's not recognizing. Maybe the java arg should be different, idk...

I have been using this argument fine with PrismLauncher on Windows, Mac and Linux. Maybe your launcher works differently? You could always try to use an absolute path to the file instead, which should work.

Thank you very much.

@logoster
Copy link

thank you so much, it's frankly infuriating that this is even an issue, all because a few mod devs wanted to act like god damn children and punish people who struggled with making mod packs in those days by making it so you couldn't use it in pre-made modpacks, without thinking about the consequences for the future (especially since as far as i can tell, all the java archive downloads are broken links at this point, i've tried them all, and it just gave me an ERROR 400, which means this is the only fix unless you happen to have an old copy of java installed already)

@MrEisbear
Copy link

Thank you soo much!

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