Launcher icon indicating copy to clipboard operation
Launcher copied to clipboard

Java not found screen shown even when java is provided in the settings file

Open Rubydesic opened this issue 3 years ago • 4 comments

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.

Rubydesic avatar Jan 21 '22 16:01 Rubydesic

Duplicate of https://github.com/MultiMC/Launcher/issues/4387

spannerman79 avatar Jan 23 '22 12:01 spannerman79

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.

Rubydesic avatar Jan 24 '22 07:01 Rubydesic

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;

  1. Download MultiMC from https://multimc.org/
  2. Download Java 8u51 from the provided wiki link
  3. 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")
  4. Extract Java8u51 and place the extracted directory as indicated in the image in the wiki link
  5. Create an empy multimc.cfg file with the following text only JavaPath=jre1.8.0_51/bin/javaw.exe
  6. Run MultiMC.
  7. 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

spannerman79 avatar Feb 07 '22 15:02 spannerman79

Had the same issue without using a relative path. Could only make it skip this screen by setting the "LastHostname" value as well.

elpinho avatar Jan 15 '23 18:01 elpinho