mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-09 11:55:52 -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)
|
downloadJava(gameVersion.toString(), targetJavaVersion, profile)
|
||||||
.thenAcceptAsync(downloadedJavaVersion -> {
|
.thenAcceptAsync(downloadedJavaVersion -> {
|
||||||
future.complete(downloadedJavaVersion);
|
future.complete(downloadedJavaVersion);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user