This commit is contained in:
2025-05-11 08:01:49 +02:00
parent 1106ced049
commit cd627b03ae
2 changed files with 16 additions and 1 deletions

View File

@@ -74,6 +74,21 @@ async function main(customExtractPath) {
}
}
async function getPath(customExtractPath) {
const requiredVersion = "17"
const isJavaInstalled = checkJavaVersion(requiredVersion)
if (!isJavaInstalled) {
if (!fs.existsSync(path.join(customExtractPath, "jdk-17.0.12", "bin", os.platform() == "win32" ? "java.exe" : "java"))) {
await main(customExtractPath)
} else {
return path.join(customExtractPath, "jdk-17.0.12", "bin", os.platform() == "win32" ? "java.exe" : "java")
}
} else {
console.log("No further action is required.")
}
}
module.exports = {
main
}