diff --git a/src/impl/requirements.ts b/src/impl/requirements.ts index bc86d296..82bb1036 100644 --- a/src/impl/requirements.ts +++ b/src/impl/requirements.ts @@ -101,6 +101,9 @@ async function checkJavaRuntime(): Promise { if (!pathExists.sync(javaHome)) { return getRejectionWithDownloadUrl(`${source} points to a missing folder`); } + if (!pathExists.sync(path.resolve(javaHome, 'bin', JAVA_FILENAME))) { + return getRejectionWithDownloadUrl(`${source} does not point to a JDK. The '${JAVA_FILENAME}' command is missing.`); + } if (!pathExists.sync(path.resolve(javaHome, 'bin', JAVAC_FILENAME))) { return getRejectionWithDownloadUrl(`${source} does not point to a JDK. The '${JAVAC_FILENAME}' command is missing.`); }