Minecraft Blogs / Tutorial

Do mods (.jar files) not work for you? Here's an easy, no-extra-installs guide to fix it.

  • 2,466 views, 16 today
  • 10
  • 6
  • 5
NarwhalYT
Level 11 : Journeyman Explorer
29
Most people's Optifine installs like a breeze
But some PCs are built different

We are going to be using Optifine because it installs as its own launcher and is so widespread (this is a Windows PC only and java edition tutorial)
First things first: make sure Java is installed (you can check by hitting Windows and typing "Java" and if "configure java" comes up you're good. Make sure to have the latest version installed by clicking configure java > updates.

If you don't have java, go to the official site here to download it.

Do mods (.jar files) not work for you? Here's an easy, no-extra-installs guide to fix it.

Download the installer and follow the steps

Once you do that, download the stubborn .jar you want to install (in this case Optifine) and we'll move to the next step

Most people can just double-click and install Optifine right away, but some PCs don't do that for some reason, but thankfully there's an easy no-extra-installations fix.

Do mods (.jar files) not work for you? Here's an easy, no-extra-installs guide to fix it.
What it looks like when I double-click Optifine.

You can fix this by going to your desktop, and creating a text file.

Do mods (.jar files) not work for you? Here's an easy, no-extra-installs guide to fix it.
Call it whatever you like, I named it "installer"

Now open it, and copy paste this code here:

java -jar [nameoffile].jar

Make sure you have "File name extensions" checked in file explorer > view > file name extensions



Now drag your .jar file to the desktop as well, and click "rename" to get its full name. Input this into the text file where [nameoffile] is listed. (make sure there is only one .jar at the end)



Now save the text file and change the .txt at the end to a .bat (so it is now a batch file)



And run the batch file (double click it)! This will run your .jar file (in this case Optifine) and you can then proceed as normal following the steps Optifine (or any other .jar) has listed.



It is normal for a command prompt window to open too (cmd) this will go away as soon as you exit the application.

Congratulations! You have now fixed your weird .jar problem!
You can do this with any amount of .jar files, by changing the name of the file for whatever mod or other file you wish in the .bat by right-clicking and hitting "edit". Make sure to save every time!


CreditI didn't create this method, however I don't know who did.
Tags

Create an account or sign in to comment.

bonkmaykr
06/25/2023 8:40 pm
Level 13 : Journeyman Taco
history
could also just open powershell and skip the .BAT entirely.
The JRE installer should set file associations for you alongside the environment variables (which must be working for the java command to run anywhere), so just reinstalling Java should have been fine enough.

in all fairness, java has always been a little weird for me so I guess stuff just not working for some people is normal? I couldn't even run Worlds without uninstalling Java 17 and putting the devkit in it's own folder because it wouldn't stop skipping over java 8. running javaw.exe directly is a useful workaround, shame the optifine devs don't pack the jar binary in an EXE to make things simpler.
2
NarwhalYT
08/22/2023 7:25 pm
Level 12 : Journeyman Explorer
Hm I guess that's true. However, I believe I tried reinstalling Java but I'm not sure. Java is just a little weird sometimes and I was just sharing how I dealt with it, and with my limited knowledge of the situation this should be a one-size-fits-all-windows users fix.
2
FluffyGuy201
06/24/2023 1:22 pm
He/Him • Level 20 : Expert Pokémon Explorer
first

great tutorial btw
2
NarwhalYT
06/24/2023 1:23 pm
Level 12 : Journeyman Explorer
Thanks mate!
2
FluffyGuy201
06/24/2023 1:44 pm
He/Him • Level 20 : Expert Pokémon Explorer
anytime
2

Welcome