Skip to content

Commit 138ff4e

Browse files
darthorimarintellij-monorepo-bot
authored andcommitted
[lsp] fix kotlin-lsp.cmd, so we check for java.exe existence (and callabiity) instead of just java
GitOrigin-RevId: f27ff245623bc2762ce1c661f4a3ef1786f01b21
1 parent 3e617b6 commit 138ff4e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/kotlin-lsp.cmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ if not exist "%DIR%\lib" (
1414

1515
set "JAVA_BIN=java"
1616
if defined JAVA_HOME (
17-
set "JAVA_BIN=%JAVA_HOME%\bin\java"
18-
if not exist "%JAVA_BIN%" (
17+
set "JAVA_BIN=%JAVA_HOME%\bin\java.exe"
18+
"%JAVA_BIN%" -version >nul 2>&1 || (
1919
echo 'java' should be on the PATH or JAVA_HOME must point to a valid JDK installation 1>&2
2020
exit /b 1
2121
)

0 commit comments

Comments
 (0)