Minor fixes

This commit is contained in:
2026-09-06 04:35:49 +02:00
parent 106e22b953
commit 4795116695
6 changed files with 20 additions and 13 deletions
+5 -2
View File
@@ -11,8 +11,11 @@ async function isJavaInstalledAndCompatibleFor(mcVersion, customExec = "java") {
return isJavaCompatible
}
async function installJava(component, majorVersion, customInstallPath = null) {
const installationPath = await sysinfo.determineInstallationPath(component, majorVersion, customInstallPath)
async function installJava(mcVersion, customExec = null) {
const versionManifest = await web.getVersionManifest(mcVersion)
const requiredComponent = await web.getRequiredJREFor(versionManifest)
const { component, majorVersion } = requiredComponent
const installationPath = await sysinfo.determineInstallationPath(component, majorVersion, customExec)
const requiredComponentDetails = await web.getJREComponentDetails(component, sysinfo.getPlatformKey())
const requiredComponentManifest = await web.getJREComponentManifest(requiredComponentDetails[0].manifest.url)
return await installer.downloadJavaComponent(requiredComponentManifest, installationPath)