When you try to play Minecraft or modpacks, an error occurs saying “Launching the game failed!” followed by an error description like this:
“Failed to download file, the file contents differ from what was expected.
Filename on disk: jna-4.4.0.jar
(The .jar file name could be different.)”
To fix the error, you can try these methods:
Method 1: Restart your computer
This can be a temporary error caused by poor network connection. When the error occurs, the first thing recommended to do is to restart your computer, then try again after a few minutes. After restarting your computer, make sure the network connection is good.
Method 2: Download the .jar file manually
The error occurs due to a .jar file failing to download. Usually, the .jar files are automatically downloaded by the Minecraft launcher. In this error, since the .jar file cannot be downloaded automatically, you can download the .jar file manually instead.
To do so:
1) Exit the Minecraft launcher.
2) Copy the URL displayed in the error message. For example, in the screenshot below, the URL is https://libraries.minecraft.net/net/java/dev/jna/jna/4.4.0/jna-4.4.0.jar.
3) Paste the copied URL to the address bar of your favorite browser and then press Enter. After that, the .jar file will be downloaded automatically.
4) Open File Explorer.
5) Navigate to the folder that is displayed in the error description. To do that, you can copy and paste the Path to the address bar of the File Explorer, then press Enter.
6) Place the downloaded .jar file to that folder overwriting the existing .jar file.
7) Check to see if you can play Minecraft or modpacks without the error.
Method 3: Disable firewall/antivirus
The firewall/antivirus can block the file download. You can try disabling the firewall then check if the error persists. If you have antivirus installed, you can also try disabling the antivirus.
Important: While the firewall/antivirus is disabled, your computer is exposed to threats. Be extra careful of files you download from the internet, emails you open and sites you visit.
To disable the firewall, here’s how:
1) On your keyboard, press the Windows logo key, type “control panel” and then select Control Panel from the result list.
2) At the Control Panel window, view by Large icons and click on Windows Defender Firewall.
3) Click on Turn Windows Defender Firewall on or off in the left pane.
4) Under both Private network settings and Public network settings, click the radio button next to Turn off Windows Defender Firewall (not recommended), and then click OK to confirm the changes.
Check to see if the error persists. If the error is not caused by the firewall, remember to enable it back after troubleshooting so your computer is protected.
If you have any antivirus installed, add the Minecraft launcher to their exception list, or disable the software temporarily. After that, check to see if the error persists. If the error is not caused by the antivirus, remember to re-enable it after troubleshooting.
Method 4: Update Minecraft
If you’re using an old version of Minecraft, it’s recommended you update it to the latest version which can avoid not launching issues like the “Launching the game failed” error.
To update Minecraft, open your Minecraft Launcher. Next to the username textbox, click Options, then click Force update at the Launcher options window.
Method 5: Reinstall Minecraft
If none of the above methods works, the last method you can try is to reinstall Minecraft. Here’s how:
1) Right-click on the Start menu button, and then select Apps and Features.
2) At the Apps & features Settings window, scroll down and locate Minecraft. Click on it and select Uninstall.
3) After the uninstallation process is complete, go to the Minecraft directory (the default directory could be “%APPDATA%.minecraft“) and delete everything.
4) Download and install Minecraft again.
Hopefully you find this article helpful. If you have any questions, feel free to drop a comment below. I’ll get back to you ASAP.