jdk11兼容

This commit is contained in:
QAIU
2024-06-19 09:51:08 +08:00
parent 966417f867
commit 9ded137539
20 changed files with 1312 additions and 224 deletions

View File

@@ -1,22 +1,22 @@
@echo off
setlocal
rem 获取当前 Java 版本信息并搜索是否包含 "17."
java -version 2>&1 | find "17." >nul
rem 获取当前 Java 版本信息并搜索是否包含 "11."
java -version 2>&1 | find "11." >nul
rem 如果找不到 JDK 17.x则下载并安装
if errorlevel 1 (
echo JDK 17.x not found. Downloading and installing...
echo JDK 11.x not found. Downloading and installing...
REM 这里添加下载和安装 JDK 的代码
rem 验证安装
java -version
echo JDK 17.x installation complete.
echo JDK 11.x installation complete.
) else (
echo JDK 17.x is already installed.
echo JDK 11.x is already installed.
)
endlocal
pause
pause