I specified a custom Java executable because I already have Java 8 and 17 installed on my computer, but since the last update of the the Minecraft Launcher, it downloads and uses it's own version of Java even if I specified it myself, it just ignores it
Comments 9
I looked at the command line (it's huge) for the Java it runs (with Sysinternals Process Explorer), copied it into a .bat file, and changed the executable path to "C:\Program Files\Java\jdk-17.0.5\bin\javaw.exe".
It launched. No errors. I was able to connect to a server. The debug screen shows Java 17.0.5 64bit.
We'll see how it goes.
Selection of the Java runtime is a feature of the launcher.
New Java patch releases are often available for separate download and installation before they make it into what Minecraft redistributes. As noted, the current security baseline for Java 17 is 17.0.5, but currently the launcher distributed 17.0.3.
Also some mods have historically had their own Java version requirements.
The folder content replacement was an attempt at a work-around for the problem of the launcher ignoring that setting. It didn't work. Bypassing the launcher altogether by putting the command line it uses to launch the game into a batch file and modifying it to use the up to date Java version appears to work so far, launching successfully at least, though further testing would be good.
Good news everyone! I just launched the launcher and after a very slow 'update' it has reverted to 2.3.462, and is properly honoring the java executable setting in installations!
It worked! The protest song (I never got around to writing, much less recording) worked!
@unknown Idk why your launcher rolledback but mine didn't, it's still in 2.3.481 and I still have this issue
Thinking of this, it would be cool if it was possible to set the Java path globally to Java 8 and 17, I wonder if there is a feedback, i'll look for it
I am seeing the same. The launcher is overriding the selected Java executable even if it is a later version than what comes with Minecraft. Currently it is insisting on running Minecraft 1.19.2 with Java 17.0.3, even though I have it configured to run with Java 17.0.5.
I tried replacing the contents of "C:\Program Files (x86)\Minecraft Launcher\runtime\java-runtime-gamma\windows-x64\java-runtime-gamma" with that of Java 17.0.5, and edited the .version file to suit, but it just redownloads 17.0.3.
Deleting C:\Program Files (x86)\Minecraft Launcher\game\JavaCheck.jar does nothing to fix the problem.
Considering this is overriding us switching to a more fully-patched Java, this is a potential security issue.