Launcher
Launcher copied to clipboard
Java not found screen shown even when java is provided in the settings file
Operating System
Windows
Description of bug
JRE provided in the "JavaPath" settings file (as a relative path, like so: ../java8/bin/javaw.exe) causes MultiMC to show the "You do not have a working Java set up yet or it went missing" screen, even though the JRE is set up and working fine.
Steps to reproduce
Open multimc.cfg. Set the "JavaPath" to a relative path to a JRE. Change the "LastHostname" to a new hostname to force MultiMC to recheck the java installation. Launch MultiMC. You should be greeted by the "You do not have a working Java set up" screen.
Suspected cause
I don't really know how C++ works but maybe it has something to do with using QStandardPaths::findExecutable when actually launching/checking for java but not in the setup wizard.
https://github.com/MultiMC/Launcher/blob/3efcccf334e28d03605dd0597f53f900105cf04b/launcher/Application.cpp#L962
Maybe this line should be QString actualPath = QStandardPaths::findExecutable(FS::ResolveExecutable(currentJavaPath))?
This issue is unique
- [X] I have searched the issue tracker and did not find an issue describing my bug.
Duplicate of https://github.com/MultiMC/Launcher/issues/4387
Duplicate of #4387
Not so, the JRE works fine when launching the game. It's just this annoying wizard that pops up on first opening of the launcher itself.
Which if you already have that info in multimc.cfg you can skip that section of the wizard.
In this case to reproduce I am following/using https://github.com/MultiMC/Launcher/wiki/Unsupported-Intel-GPUs
Reproduction steps;
- Download MultiMC from https://multimc.org/
- Download Java 8u51 from the provided wiki link
- Extract the multimc zip to a known location. (this step is needed for those that use WinRAR or any other compression program that allows for "Run from within zip")
- Extract Java8u51 and place the extracted directory as indicated in the image in the wiki link
- Create an empy
multimc.cfgfile with the following text onlyJavaPath=jre1.8.0_51/bin/javaw.exe - Run MultiMC.
- Select your language, Hit "Next" at Java selection, Click "Yes" on the pop up, select your pref for analytics.
Now if you head over to Settings -> Java and press "Test" you will get a confirmation.
On second ( and following starts ) of MultiMC you no longer have the wizard.
So yes, duplicate of https://github.com/MultiMC/Launcher/issues/4387
Had the same issue without using a relative path. Could only make it skip this screen by setting the "LastHostname" value as well.