mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-09 03:46:18 -04:00
Fix stuck on startup when no suitable Java is found (#1671)
This commit is contained in:
parent
3c3c28aaa5
commit
b5c92c1564
@ -369,7 +369,11 @@ public final class LauncherHelper {
|
||||
}
|
||||
}
|
||||
|
||||
if (targetJavaVersion != null) {
|
||||
if (targetJavaVersion == null) {
|
||||
Controllers.confirm(i18n("launch.failed.no_accepted_java"), i18n("message.warning"), MessageType.WARNING, continueAction, () -> {
|
||||
future.completeExceptionally(new CancellationException("No accepted java"));
|
||||
});
|
||||
} else {
|
||||
downloadJava(gameVersion.toString(), targetJavaVersion, profile)
|
||||
.thenAcceptAsync(downloadedJavaVersion -> {
|
||||
future.complete(downloadedJavaVersion);
|
||||
|
Loading…
x
Reference in New Issue
Block a user