Installing OptiFine without installing Java

I’m a huge fan of using the OptiFine mod while playing Minecraft. It makes the game run smoother on my Mac, and allows me to use really cool shaders on my gaming desktop. However, to install OptiFine, you need to have a Java runtime installed. If you don’t want to pollute your system by installing Java, you can simply use the Java runtime that is included with Minecraft to install OptiFine.

Note that this article assumes that you are using the .exe or .dmg releases of Minecraft, and NOT the .jar release. Linux and .jar releases of Minecraft require a Java runtime installed to play the game.

Installation on macOS

  1. Open your terminal
  2. cd to this directory: ~/Library/Application Support/minecraft/runtime/jre-x64/jre.bundle/Contents/Home/bin
  3. Run this command: ./java -jar ~/Downloads/OptiFine-version.jar
  4. Install as usual.

Output should be similar to this:

Mac Terminal

Installation on Windows

  1. Open Command Prompt or Powershell
  2. cd to C:\Program Files (x86)\Minecraft\runtime\jre-x64\bin\
  3. Type java -jar then press spacebar, and then drag your OptiFine .jar onto the command prompt window
  4. Install as usual.